gatsby-docker icon indicating copy to clipboard operation
gatsby-docker copied to clipboard

allow overrides in nginx configuration

Open gunzip opened this issue 5 years ago • 2 comments

as the configuration file is set now, it is impossible to http add headers because the hardcoded location directives precede the customization part. I propose to put the custom environment variable $CUSTOM_SERVER_CONFIG before the location sections.

gunzip avatar Nov 18 '19 12:11 gunzip

@gunzip We noticed that the body of this issue is blank.

Please fill in this field with more information to help the maintainers resolve your issue.

Generated by :no_entry_sign: dangerJS

gatsbot[bot] avatar Nov 18 '19 12:11 gatsbot[bot]

Could you give an example of an override you'd want to do, and where in the resulting nginx config file it would need to be? You can see the file that gets generated by running:

docker run -rm IMAGE_NAME cat /etc/nginx/mushed.conf

One serious limitation here is that nginx won't let you duplicate a setting in a block; it will quit with an error rather than start. So overrides may not be possible doing what we're doing nginx-boot.sh script that we're using to handle the customizations. But if I know what you're trying to do, we can figure out if this is the way to do it.

torenware avatar Jun 22 '20 22:06 torenware