Refactor nginx configuration and update README
- Moved BACKEND_URL configuration to the frontend service in the README. - Added validation for the generated nginx configuration in the entrypoint script. - Removed fallback nginx configuration copy from the Dockerfile. - Adjusted nginx template to ensure proper header formatting. This improves the deployment process and clarifies configuration instructions.
This commit is contained in:
@@ -10,6 +10,8 @@ echo "Configuring nginx with BACKEND_URL: ${BACKEND_URL}"
|
||||
# Only substitute BACKEND_URL, preserve nginx variables like $http_upgrade
|
||||
envsubst '${BACKEND_URL}' < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf
|
||||
|
||||
# Execute the main command (nginx)
|
||||
exec "$@"
|
||||
# Validate the generated nginx configuration before starting
|
||||
nginx -t -c /etc/nginx/nginx.conf
|
||||
|
||||
# Execute the main command (nginx)
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user