Skip to content

Instantly share code, notes, and snippets.

@mirhec
Created September 28, 2017 11:24
Show Gist options
  • Save mirhec/f57c64a0805211fde5e0824aed019391 to your computer and use it in GitHub Desktop.
Save mirhec/f57c64a0805211fde5e0824aed019391 to your computer and use it in GitHub Desktop.
The nginx-proxy docker-compose file I'm using to host my websites
version: '2'
services:
nginx-proxy:
image: jwilder/nginx-proxy:alpine
container_name: nginx-proxy
restart: always
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./client_max_body_size.conf:/etc/nginx/conf.d/client_max_body_size.conf:ro
- ./certs:/etc/nginx/certs
- ./vhost.d:/etc/nginx/vhost.d
- ./html:/usr/share/nginx/html
networks:
- nginx-proxy
labels:
- com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy
letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion
container_name: letsencrypt_companion
restart: always
volumes:
- ./certs:/etc/nginx/certs
- /var/run/docker.sock:/var/run/docker.sock:ro
volumes_from:
- nginx-proxy
networks:
nginx-proxy:
external:
name: nginx-proxy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment