feat(docker): wait for backend host to resolve before start #145

Merged
csimonis merged 2 commits from bugfix/frontend into main 2025-04-24 12:50:53 +00:00

View file

@ -3,5 +3,11 @@
: ${BACKEND_HOST:=localhost}
: ${BACKEND_PORT:=8080}
# Wait until the backend host is resolvable
csimonis marked this conversation as resolved

useless just like you

useless just like you

your mommma

your mommma
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;'