Skip to content

Commit

Permalink
fix(bin/apisix-start.sh): change the order of apisix start command (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
wklken authored Nov 7, 2023
1 parent d530ead commit 39db8e6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@ RUN ls /usr/local/apisix/patches | sort | xargs -L1 -I __patch_file__ sh -c 'cat

RUN chmod 755 /data/bkgateway/bin/* && chmod 777 /usr/local/apisix/logs


CMD ["sh", "-c", "/usr/bin/apisix init && /usr/bin/apisix init_etcd && /usr/local/openresty/bin/openresty -p /usr/local/apisix -g 'daemon off;'"]

STOPSIGNAL SIGQUIT
13 changes: 4 additions & 9 deletions src/build/bin/apisix-start.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/sh
echo "starting......"


# if standaloneConfigPath not empty, watch the path
if [ x"${standaloneConfigPath}" != x"" ]
then
Expand All @@ -17,11 +16,6 @@ then
echo "config-watcher for ${standaloneConfigPath} started"
fi

# start
echo "start apisix"
apisix start
echo "apisix started"

# start nginx error to sentry
if [ x"${BK_APIGW_NGINX_ERROR_LOG_SENTRY_DSN}" != x"" ]
then
Expand All @@ -34,8 +28,9 @@ fi

echo "start config-watcher for ${apisixDebugConfigPath}(note: will wait until the container quit)"
# note the shell will wait here, so, YOU SHOULD NOT PUT ANY COMMANDS AFTER HERE
sh /data/bkgateway/bin/config-watcher-start.sh "-sourcePath ${apisixDebugConfigPath} -destPath /usr/local/apisix/conf -files debug.yaml -isConfigMap"
sh /data/bkgateway/bin/config-watcher-start.sh "-sourcePath ${apisixDebugConfigPath} -destPath /usr/local/apisix/conf -files debug.yaml -isConfigMap" &

echo "start apisix"
/usr/bin/apisix init && /usr/bin/apisix init_etcd && /usr/local/openresty/bin/openresty -p /usr/local/apisix -g 'daemon off;'

echo "done"

echo "quit"

0 comments on commit 39db8e6

Please sign in to comment.