Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: sed not suitable for docker if config.yaml is volume mounted #529 #534

Merged
merged 1 commit into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions debian-dev/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ deployment:
_EOC_
else
# updating config.yaml for standalone mode
sed -i 's/role: traditional/role: data_plane/' ${PREFIX}/conf/config.yaml
sed -i 's/role_traditional:/role_data_plane:/' ${PREFIX}/conf/config.yaml
sed -i 's/config_provider: etcd/config_provider: yaml/' ${PREFIX}/conf/config.yaml
echo "$(sed 's/role: traditional/role: data_plane/g' ${PREFIX}/conf/config.yaml)" > ${PREFIX}/conf/config.yaml
echo "$(sed 's/role_traditional:/role_data_plane:/g' ${PREFIX}/conf/config.yaml)" > ${PREFIX}/conf/config.yaml
echo "$(sed 's/config_provider: etcd/config_provider: yaml/g' ${PREFIX}/conf/config.yaml)" > ${PREFIX}/conf/config.yaml

fi

if [ ! -f "${PREFIX}/conf/apisix.yaml" ]; then
Expand Down
6 changes: 3 additions & 3 deletions debian/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ deployment:
_EOC_
else
# updating config.yaml for standalone mode
sed -i 's/role: traditional/role: data_plane/' ${PREFIX}/conf/config.yaml
sed -i 's/role_traditional:/role_data_plane:/' ${PREFIX}/conf/config.yaml
sed -i 's/config_provider: etcd/config_provider: yaml/' ${PREFIX}/conf/config.yaml
echo "$(sed 's/role: traditional/role: data_plane/g' ${PREFIX}/conf/config.yaml)" > ${PREFIX}/conf/config.yaml
echo "$(sed 's/role_traditional:/role_data_plane:/g' ${PREFIX}/conf/config.yaml)" > ${PREFIX}/conf/config.yaml
echo "$(sed 's/config_provider: etcd/config_provider: yaml/g' ${PREFIX}/conf/config.yaml)" > ${PREFIX}/conf/config.yaml
fi

if [ ! -f "${PREFIX}/conf/apisix.yaml" ]; then
Expand Down
6 changes: 3 additions & 3 deletions redhat/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ deployment:
_EOC_
else
# updating config.yaml for standalone mode
sed -i 's/role: traditional/role: data_plane/' ${PREFIX}/conf/config.yaml
sed -i 's/role_traditional:/role_data_plane:/' ${PREFIX}/conf/config.yaml
sed -i 's/config_provider: etcd/config_provider: yaml/' ${PREFIX}/conf/config.yaml
echo "$(sed 's/role: traditional/role: data_plane/g' ${PREFIX}/conf/config.yaml)" > ${PREFIX}/conf/config.yaml
echo "$(sed 's/role_traditional:/role_data_plane:/g' ${PREFIX}/conf/config.yaml)" > ${PREFIX}/conf/config.yaml
echo "$(sed 's/config_provider: etcd/config_provider: yaml/g' ${PREFIX}/conf/config.yaml)" > ${PREFIX}/conf/config.yaml
fi

if [ ! -f "${PREFIX}/conf/apisix.yaml" ]; then
Expand Down
Loading