Created
July 13, 2017 04:06
-
-
Save halfb00t/794b26f89f2b506a5f2f9ce3c7befb4c to your computer and use it in GitHub Desktop.
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
version: '2' | |
networks: | |
nginx: | |
services: | |
nginx-proxy: | |
container_name: nginx-proxy | |
image: jwilder/nginx-proxy:alpine | |
restart: always | |
environment: | |
DEFAULT_HOST: <YOUR-DEFAULT-VHOST> | |
ports: | |
- 80:80 | |
- 443:443 | |
volumes: | |
- ./volumes/nginx/conf.d:/etc/nginx/conf.d | |
- ./volumes/nginx/vhost.d:/etc/nginx/vhost.d | |
- ./volumes/nginx/html:/usr/share/nginx/html | |
- ./volumes/nginx/certs:/etc/nginx/certs:ro | |
- /var/run/docker.sock:/tmp/docker.sock:ro | |
labels: | |
- com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy=true | |
networks: | |
- nginx | |
nginx-letsencrypt: | |
container_name: nginx-letsencrypt | |
image: jrcs/letsencrypt-nginx-proxy-companion | |
restart: always | |
volumes_from: | |
- nginx-proxy | |
volumes: | |
- ./volumes/nginx/certs:/etc/nginx/certs:rw | |
- /var/run/docker.sock:/var/run/docker.sock:ro | |
networks: | |
- nginx | |
app1: | |
image: your-app1-image | |
restart: always | |
environment: | |
VIRTUAL_HOST: your-app1-fqdn | |
VIRTUAL_PORT: 8080 | |
LETSENCRYPT_HOST: your-app1-fqdn | |
LETSENCRYPT_EMAIL: webmaster@your-app1-domain | |
expose: | |
- 8080 | |
networks: | |
- nginx | |
app2: | |
image: your-app2-image | |
restart: always | |
environment: | |
VIRTUAL_HOST: your-app2-fqdn | |
VIRTUAL_PORT: 8090 | |
LETSENCRYPT_HOST: your-app2-fqdn | |
LETSENCRYPT_EMAIL: webmaster@your-app2-domain | |
expose: | |
- 8090 | |
networks: | |
- nginx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment