Last active
July 28, 2018 00:28
-
-
Save DonBattery/65f8824211c160cab831c9f66b98b9c8 to your computer and use it in GitHub Desktop.
given your 80 and 443 ports are forwarded, and yoursite.com points to your external IP <docker-compose -f https-poc.yml up> will start the hello-world webserver and it will be available on yoursite.com via HTTPS
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' | |
services: | |
nginx-proxy: | |
image: jwilder/nginx-proxy | |
container_name: NginX_Proxy | |
ports: | |
- 80:80 | |
- 443:443 | |
networks: | |
- nginxproxy | |
volumes: | |
- /var/run/docker.sock:/tmp/docker.sock:ro | |
- /etc/nginx/vhost.d | |
- /usr/share/nginx/html | |
- /data/letsencrypt-nginx-proxy-companion/certs/:/etc/nginx/certs:ro | |
labels: | |
- "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy" | |
letsencrypt-nginx-proxy-companion: | |
image: jrcs/letsencrypt-nginx-proxy-companion | |
container_name: letsencrypt-companion | |
volumes_from: | |
- nginx-proxy | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock:ro | |
- /data/letsencrypt-nginx-proxy-companion/certs/:/etc/nginx/certs:rw | |
hello-world: | |
image: tutum/hello-world | |
container_name: tutum-hello-world | |
environment: | |
- VIRTUAL_HOST=yoursite.com,www.yoursite.com | |
- LETSENCRYPT_HOST=yoursite.com,www.yoursite.com | |
- LETSENCRYPT_EMAIL=youremail@gmail.com | |
ports: | |
- 8080:80 | |
networks: | |
- nginxproxy | |
networks: | |
nginxproxy: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment