
The idea: - all nodes generate their config in /etc/nginx/node.conf.d/HOSTNAME.conf - a python script can read all configs and merge them into one and reload nginx - using entr in Procfile, anytime any of these config change, they are merged immediately - the default nginx reload on notify is being removed to prevent from reloading twice
3 lines
203 B
Text
3 lines
203 B
Text
swarmmerge: while true; do ls -d /etc/nginx/node.conf.d/*.conf | entr -d python3 /app/mergeswarm.py; done
|
|
dockergen: docker-gen -watch /app/nginx.tmpl /etc/nginx/node.conf.d/`hostname`.conf
|
|
nginx: nginx
|