Created
July 28, 2017 22:07
-
-
Save mry/54cbb4126a3a86f8712d26312031eb6c to your computer and use it in GitHub Desktop.
docker-compose file for Let's Encrypt on a Synology
This file contains hidden or 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
version: '2' | |
services: | |
proxy: | |
image: jwilder/nginx-proxy | |
container_name: nginx-proxy | |
ports: | |
- '30080:80' | |
- '4343:443' | |
volumes: | |
- /var/run/docker.sock:/tmp/docker.sock:ro | |
- /etc/nginx/vhost.d # to update vhost configuration | |
- /volume4/docker/nginx-proxy/html:/usr/share/nginx/html # to write challenge files | |
- /volume4/docker/nginx-proxy/certs:/etc/nginx/certs:ro # update this to change cert location | |
web: | |
image: 'nginx' | |
container_name: nginx-web | |
expose: | |
- '80' | |
environment: | |
- VIRTUAL_HOST=your_comma_separated_list_of_fqdns | |
- VIRTUAL_PORT=80 | |
- LETSENCRYPT_TEST=false | |
- LETSENCRYPT_HOST=your_comma_separated_list_of_fqdns | |
- LETSENCRYPT_EMAIL=your@email | |
ssl-companion: | |
image: jrcs/letsencrypt-nginx-proxy-companion | |
container_name: ssl-companion | |
dns: | |
- '8.8.8.8' | |
- '8.8.4.4' | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock:ro #companion maps differently | |
- /volume4/docker/nginx-proxy/certs:/etc/nginx/certs:rw # same path as above, now RW | |
volumes_from: | |
- proxy | |
depends_on: | |
- proxy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment