Skip to content

Instantly share code, notes, and snippets.

@thinmy
Created December 7, 2020 11:43
Show Gist options
  • Save thinmy/d494f75797a7b518bc406fcada7ad819 to your computer and use it in GitHub Desktop.
Save thinmy/d494f75797a7b518bc406fcada7ad819 to your computer and use it in GitHub Desktop.
Docker nginx proxy with letsencrypt companion
version: '3.2'
services:
nginx-proxy:
container_name: nginx-proxy
image: jwilder/nginx-proxy
environment:
- ENABLE_IPV6=true
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- nginx_certs:/etc/nginx/certs
- nginx_vhosts:/etc/nginx/vhost.d
- nginx_html:/usr/share/nginx/html
labels:
- "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy"
nginx-proxy-letsencrypt:
container_name: nginx-proxy-lets-encrypt
image: jrcs/letsencrypt-nginx-proxy-companion
environment:
- DEFAULT_EMAIL=thinmy@extractify.ai
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- nginx_certs:/etc/nginx/certs
- nginx_vhosts:/etc/nginx/vhost.d
- nginx_html:/usr/share/nginx/html
depends_on:
- nginx-proxy
networks:
default:
external:
name: nginx_proxy
volumes:
nginx_certs:
nginx_vhosts:
nginx_html:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment