Custom Nginx config file


#1

So I want to use a custom Nginx config file which I used to mount into my container on my dev machine. I know there is no mounting support on your side only named values.
I suppose the reason is that you build the image and ship it without the files from the repo where my Nginx config files reside. Is that right?
So all I need for the container to be executed on the device must be built into the image. Correct?
So how does one solve the issue where a custom config file, e.g. for Nginx is used? Building a custom image?


#4

bump


#5

I personally would define environment variables that could be customized per device from the dashboard. Then upon container start you may generate the config file dynamically by using those variables and start the nginx service.


#7

I had a similar problem that I solved by making a simple index flat file DB that sets variables based on the device’s IP address, then substitutes values in config files using sed.

You can also have a whole project for dev nginx devices if that makes sense.