Merge pull request 'feat(docker): wait for backend host to resolve before start' (!145) from bugfix/frontend into main
Reviewed-on: #145
This commit is contained in:
commit
dd4f754e7e
1 changed files with 6 additions and 0 deletions
|
@ -3,5 +3,11 @@
|
|||
: ${BACKEND_HOST:=localhost}
|
||||
: ${BACKEND_PORT:=8080}
|
||||
|
||||
# Wait until the backend host is resolvable
|
||||
echo "Waiting for backend host $BACKEND_HOST..."
|
||||
until getent hosts "$BACKEND_HOST" > /dev/null; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
envsubst '$BACKEND_HOST $BACKEND_PORT' < /etc/nginx/templates/nginx.conf.template > /etc/nginx/conf.d/default.conf
|
||||
exec nginx -g 'daemon off;'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue