feat: add environment variable to trust the reverse proxy

This commit is contained in:
Elias Schneider
2024-09-18 23:01:50 +02:00
parent 97dc3ecfdd
commit b13a81a88c
9 changed files with 40 additions and 19 deletions

View File

@@ -4,10 +4,17 @@
cp -rn /tmp/img/* /opt/app/frontend/public/img
# Start Caddy
caddy start --config /etc/caddy/Caddyfile &
if [ "$TRUST_PROXY" = "true" ]; then
caddy start --config /etc/caddy/Caddyfile.trust-proxy &
else
caddy start --config /etc/caddy/Caddyfile &
fi
# Run the frontend server
PORT=3333 HOSTNAME=0.0.0.0 node frontend/server.js &
# Run the backend server
cd backend && npm run prod
# Wait for all processes to finish
wait -n