Skip to content

Instantly share code, notes, and snippets.

@Brawn1
Last active May 27, 2018 15:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Brawn1/ace8599947b05520287f7ccf17944251 to your computer and use it in GitHub Desktop.
Save Brawn1/ace8599947b05520287f7ccf17944251 to your computer and use it in GitHub Desktop.
Docker Compose script for easy setup jwilder Nginx-Reverse Proxy with Letsencrypt-Companion https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion
version: '2.0'
services:
nginx-proxy:
restart: always
image: jwilder/nginx-proxy:latest
ports:
- '80:80'
- '443:443'
volumes:
- nginxcerts:/etc/nginx/certs:ro
- nginxvhostd:/etc/nginx/vhost.d
- /usr/share/nginx/html
- /var/run/docker.sock:/tmp/docker.sock:ro
- nginxconfd:/etc/nginx/conf.d
networks:
- nginx-proxy
letsencrypt-nginx-proxy-companion:
restart: always
image: jrcs/letsencrypt-nginx-proxy-companion
# environment: # remove this fake certificate in production
# - ACME_CA_URI=https://acme-staging.api.letsencrypt.org/directory
volumes:
- nginxcerts:/etc/nginx/certs:rw
- /var/run/docker.sock:/var/run/docker.sock:ro
volumes_from:
- nginx-proxy
networks:
nginx-proxy:
external: true
volumes:
nginxcerts:
nginxvhostd:
nginxconfd:
@Brawn1
Copy link
Author

Brawn1 commented Apr 4, 2018

added Volume nginxconfd to add optional conf files for Nginx-Proxy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment