JasonRivers / Docker-nginx-rtmp

Docker Image for RTMP streams using Nginx
181 stars 114 forks source link

Config rewrite on restart #7

Closed Telain closed 6 years ago

Telain commented 6 years ago

Everytime I restart the docker, nginx.conf is replaced. Can this be altered to not do that?

Telain commented 6 years ago

I worked around this for now by defining a run.sh of my own in the docker config.

JasonRivers commented 6 years ago

Hi @Telain What configuration is it you need that isn't there? The idea of writing the config at startup is to add in anything the user has put into the environment. I'll look at changing it so that it only does this if the file doesn't exist, this way you can mount with a configuration file and all should work.

JasonRivers commented 6 years ago

From 8ae8cf3 you should be able to mount your own config using: -v /path/to/nginx.conf:/opt/nginx/conf/nginx.conf the container will now only create this file at startup if the file does not exist.