Created
December 22, 2016 18:52
-
-
Save albertzak/6b239b85ace7df1535c00626a431eda2 to your computer and use it in GitHub Desktop.
Docker + nginx + Let's Encrypt = π
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
letsencrypt: | |
environment: | |
- [email protected] | |
image: 'jrcs/letsencrypt-nginx-proxy-companion:v1.3' | |
volumes: | |
- '/root/certs:/etc/nginx/certs' | |
- '/var/run/docker.sock:/var/run/docker.sock:ro' | |
volumes_from: | |
- nginx | |
nginx: | |
image: 'jwilder/nginx-proxy:latest' | |
ports: | |
- '80:80' | |
- '443:443' | |
restart: always | |
volumes: | |
- '/root/certs:/etc/nginx/certs:ro' | |
- /etc/nginx/vhost.d | |
- /usr/share/nginx/html | |
- '/var/run/docker.sock:/tmp/docker.sock:ro' | |
app1: | |
environment: | |
- [email protected] | |
- LETSENCRYPT_HOST=app1.example.com | |
- VIRTUAL_HOST=app1.example.com | |
- VIRTUAL_PORT=5000 | |
expose: | |
- '5000' | |
app2: | |
environment: | |
- [email protected] | |
- LETSENCRYPT_HOST=app2.example.com | |
- VIRTUAL_HOST=app2.example.com | |
- VIRTUAL_PORT=3000 | |
expose: | |
- '3000' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment