Skip to content

Commit

Permalink
fix: overwrite apisix.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
kamlyli committed Sep 25, 2023
1 parent 328fc9d commit 6263333
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
8 changes: 8 additions & 0 deletions centos/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ _EOC_
/usr/local/apisix/yq -i '.deployment.role_data_plane.config_provider = "yaml"' ${PREFIX}/conf/config.yaml
rm /usr/local/apisix/yq
fi

if [ ! -f "${PREFIX}/conf/apisix.yaml" ]; then
cat > ${PREFIX}/conf/apisix.yaml << _EOC_
routes:
-
#END
_EOC_
fi
/usr/bin/apisix init
else
/usr/bin/apisix init
Expand Down
8 changes: 8 additions & 0 deletions debian-dev/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ _EOC_
/usr/local/apisix/yq -i '.deployment.role_data_plane.config_provider = "yaml"' ${PREFIX}/conf/config.yaml
rm /usr/local/apisix/yq
fi

if [ ! -f "${PREFIX}/conf/apisix.yaml" ]; then
cat > ${PREFIX}/conf/apisix.yaml << _EOC_
routes:
-
#END
_EOC_
fi
/usr/bin/apisix init
else
/usr/bin/apisix init
Expand Down
8 changes: 8 additions & 0 deletions debian/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ _EOC_
/usr/local/apisix/yq -i '.deployment.role_data_plane.config_provider = "yaml"' ${PREFIX}/conf/config.yaml
rm /usr/local/apisix/yq
fi

if [ ! -f "${PREFIX}/conf/apisix.yaml" ]; then
cat > ${PREFIX}/conf/apisix.yaml << _EOC_
routes:
-
#END
_EOC_
fi
/usr/bin/apisix init
else
/usr/bin/apisix init
Expand Down
8 changes: 8 additions & 0 deletions redhat/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ _EOC_
/usr/local/apisix/yq -i '.deployment.role_data_plane.config_provider = "yaml"' ${PREFIX}/conf/config.yaml
rm /usr/local/apisix/yq
fi

if [ ! -f "${PREFIX}/conf/apisix.yaml" ]; then
cat > ${PREFIX}/conf/apisix.yaml << _EOC_
routes:
-
#END
_EOC_
fi
/usr/bin/apisix init
else
/usr/bin/apisix init
Expand Down

0 comments on commit 6263333

Please sign in to comment.