Created
September 12, 2015 13:01
-
-
Save snorremd/019ba2b074030215c55d to your computer and use it in GitHub Desktop.
nginx and dockergen containers for automatic proxying
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nginx: | |
image: nginx:latest | |
volumes: | |
- /tmp/nginx:/etc/nginx/conf.d | |
- /srv/nginx/certs:/etc/nginx/certs | |
ports: | |
- "80:80" | |
#- "443:443" Only add if you want ssl | |
dockergen: | |
image: jwilder/docker-gen | |
environment: | |
- DEFAULT_HOST=yourhost.example | |
volumes: | |
- /var/run/docker.sock:/tmp/docker.sock:ro | |
- /srv/nginx-proxy:/etc/docker-gen/templates | |
volumes_from: | |
- nginx | |
command: -notify-sighup nginx -watch -only-exposed /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment