From 6263333df47a180a58cb029b5706e24509937137 Mon Sep 17 00:00:00 2001 From: kamlyli Date: Mon, 25 Sep 2023 09:54:58 +0800 Subject: [PATCH] fix: overwrite apisix.yaml --- centos/docker-entrypoint.sh | 8 ++++++++ debian-dev/docker-entrypoint.sh | 8 ++++++++ debian/docker-entrypoint.sh | 8 ++++++++ redhat/docker-entrypoint.sh | 8 ++++++++ 4 files changed, 32 insertions(+) diff --git a/centos/docker-entrypoint.sh b/centos/docker-entrypoint.sh index d3deef62..92b8efdc 100755 --- a/centos/docker-entrypoint.sh +++ b/centos/docker-entrypoint.sh @@ -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 diff --git a/debian-dev/docker-entrypoint.sh b/debian-dev/docker-entrypoint.sh index a451a1c5..1c0e80ac 100755 --- a/debian-dev/docker-entrypoint.sh +++ b/debian-dev/docker-entrypoint.sh @@ -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 diff --git a/debian/docker-entrypoint.sh b/debian/docker-entrypoint.sh index d3deef62..92b8efdc 100755 --- a/debian/docker-entrypoint.sh +++ b/debian/docker-entrypoint.sh @@ -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 diff --git a/redhat/docker-entrypoint.sh b/redhat/docker-entrypoint.sh index d3deef62..92b8efdc 100755 --- a/redhat/docker-entrypoint.sh +++ b/redhat/docker-entrypoint.sh @@ -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