What triggers NGINX .template to copy?

a year ago by appleberry to c/docker

Documentation for Docker Official Images in docker-library - docker-library/docs

I have set up my site.conf as a site.conf.template file in /etc/nginx/templates/

It has successfully been copied into etc/nginx/conf.d before, but after making some changes to the template and rebuilding the container, it is not copying again. There are no errors in the docker log for the nginx container, in fact it is running (without the sites config).

I have tried changing the local copy of conf.d to 775, but other than that I can't think of what would be stopping it from copying or triggering. Or where to look for error logs. ๐Ÿ™

pcouy 1 point a year ago

Hรขve you made a persistent volume for /etc/nginx (or any of its subdirectories) ?

IIRC, the templates are interpolated/copied on container start if the resulting configs do not exist already. Having a persistent volume would cause the issue you're experiencing

path: 0 18749551, hotness: undefined, score: 1, children: 1
appleberry 1 point a year ago

Thanks. I did create a persistent volume, but I thought that deleting the files would trigger them to be recreated when the container restarts.

path: 0 18749551 18874612, hotness: undefined, score: 1, children: 0
docker
docker

@programming.dev

login for more options
1479
100
12

go to feed...