3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00
zeppelin/docker/production/start-api.sh

19 lines
668 B
Bash
Raw Permalink Normal View History

2022-08-06 22:18:21 +03:00
#!/bin/bash
# This wrapper script is used for two purposes:
# 1. Waiting for the prepare_backend container to finish before starting (see https://github.com/docker/compose/issues/5007#issuecomment-335815508)
# 2. Forwarding signals to the app (see https://unix.stackexchange.com/a/196053)
# Wait for the backend preparations to finish before continuing
echo "Waiting for prepare_backend to finish before starting the API..."
while ping -c1 prepare_backend &>/dev/null; do sleep 1; done;
cd /zeppelin/backend
2023-04-04 20:44:13 +03:00
if [ -n "$DEBUG" ]; then
echo "Starting API in debug mode"
2023-04-29 19:44:08 +03:00
exec npm run start-api-prod-debug
2023-04-04 20:44:13 +03:00
else
echo "Starting API"
exec npm run start-api-prod
fi