Created
December 17, 2016 02:55
-
-
Save yuetyeelo2855/5d8ab4803fafac93b009081a19f3bcd3 to your computer and use it in GitHub Desktop.
Example docker-compose.yml of Nginx Proxy with Let's Encrypt
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-proxy: | |
image: jwilder/nginx-proxy | |
container_name: nginx-proxy | |
privileged: true | |
ports: | |
- 80:80 | |
- 443:443 | |
volumes: | |
- ./nginx-proxy/certs:/etc/nginx/certs:ro | |
- ./nginx-proxy/htpasswd:/etc/nginx/htpasswd | |
- /etc/nginx/vhost.d | |
- /usr/share/nginx/html | |
- /var/run/docker.sock:/tmp/docker.sock:ro | |
restart: always | |
letsencrypt-nginx: | |
image: alastaircoote/docker-letsencrypt-nginx-proxy-companion | |
container_name: letsencrypt-nginx | |
privileged: true | |
volumes: | |
- ./nginx-proxy/certs:/etc/nginx/certs:rw | |
- /var/run/docker.sock:/var/run/docker.sock:ro | |
volumes_from: | |
- nginx-proxy | |
restart: always | |
whoami: | |
image: jwilder/whoami | |
environment: | |
- VIRTUAL_HOST=[HOST] | |
- LETSENCRYPT_HOST=[HOST] | |
- LETSENCRYPT_EMAIL=[EMAIL] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment