Skip to content

Commit

Permalink
fix: readd the apisix.yaml in entrypoint script
Browse files Browse the repository at this point in the history
Signed-off-by: Ashish Tiwari <[email protected]>
  • Loading branch information
Revolyssup committed Sep 25, 2023
1 parent 328fc9d commit 1b8e04e
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 12 deletions.
10 changes: 7 additions & 3 deletions centos/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,19 @@ PREFIX=${APISIX_PREFIX:=/usr/local/apisix}
if [[ "$1" == "docker-start" ]]; then
if [ "$APISIX_STAND_ALONE" = "true" ]; then
# If the file is not present then initialise the content otherwise update relevant keys for standalone mode
if [ ! -f "${PREFIX}/conf/apisix.yaml" ]; then
cat > ${PREFIX}/conf/apisix.yaml << _EOC_
routes:
-
#END
_EOC_
fi
if [ ! -f "${PREFIX}/conf/config.yaml" ]; then
cat > ${PREFIX}/conf/config.yaml << _EOC_
deployment:
role: data_plane
role_data_plane:
config_provider: yaml
routes:
-
#END
_EOC_
else
wget -qO /usr/local/apisix/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 \
Expand Down
10 changes: 7 additions & 3 deletions debian-dev/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,19 @@ PREFIX=${APISIX_PREFIX:=/usr/local/apisix}
if [[ "$1" == "docker-start" ]]; then
if [ "$APISIX_STAND_ALONE" = "true" ]; then
# If the file is not present then initialise the content otherwise update relevant keys for standalone mode
if [ ! -f "${PREFIX}/conf/apisix.yaml" ]; then
cat > ${PREFIX}/conf/apisix.yaml << _EOC_
routes:
-
#END
_EOC_
fi
if [ ! -f "${PREFIX}/conf/config.yaml" ]; then
cat > ${PREFIX}/conf/config.yaml << _EOC_
deployment:
role: data_plane
role_data_plane:
config_provider: yaml
routes:
-
#END
_EOC_
else
wget -qO /usr/local/apisix/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 \
Expand Down
10 changes: 7 additions & 3 deletions debian/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,19 @@ PREFIX=${APISIX_PREFIX:=/usr/local/apisix}
if [[ "$1" == "docker-start" ]]; then
if [ "$APISIX_STAND_ALONE" = "true" ]; then
# If the file is not present then initialise the content otherwise update relevant keys for standalone mode
if [ ! -f "${PREFIX}/conf/apisix.yaml" ]; then
cat > ${PREFIX}/conf/apisix.yaml << _EOC_
routes:
-
#END
_EOC_
fi
if [ ! -f "${PREFIX}/conf/config.yaml" ]; then
cat > ${PREFIX}/conf/config.yaml << _EOC_
deployment:
role: data_plane
role_data_plane:
config_provider: yaml
routes:
-
#END
_EOC_
else
wget -qO /usr/local/apisix/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 \
Expand Down
10 changes: 7 additions & 3 deletions redhat/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,19 @@ PREFIX=${APISIX_PREFIX:=/usr/local/apisix}
if [[ "$1" == "docker-start" ]]; then
if [ "$APISIX_STAND_ALONE" = "true" ]; then
# If the file is not present then initialise the content otherwise update relevant keys for standalone mode
if [ ! -f "${PREFIX}/conf/apisix.yaml" ]; then
cat > ${PREFIX}/conf/apisix.yaml << _EOC_
routes:
-
#END
_EOC_
fi
if [ ! -f "${PREFIX}/conf/config.yaml" ]; then
cat > ${PREFIX}/conf/config.yaml << _EOC_
deployment:
role: data_plane
role_data_plane:
config_provider: yaml
routes:
-
#END
_EOC_
else
wget -qO /usr/local/apisix/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 \
Expand Down

0 comments on commit 1b8e04e

Please sign in to comment.