Skip to content

Instantly share code, notes, and snippets.

@parrotmac
Created July 9, 2024 00:57
Show Gist options
  • Save parrotmac/a06899da53aee5f8a236fc461669f6c7 to your computer and use it in GitHub Desktop.
Save parrotmac/a06899da53aee5f8a236fc461669f6c7 to your computer and use it in GitHub Desktop.
version: '2'
services:
proxy:
restart: always
image: jwilder/nginx-proxy:alpine
ports:
- "80:80"
- "443:443"
volumes:
- ./certs/:/etc/nginx/certs:ro
- /etc/nginx/vhost.d
- /usr/share/nginx/html
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./vhost:/etc/nginx/vhost.d
container_name: nginx-proxy
networks:
- default
- nginx-proxy
letsencrypt:
restart: always
image: jrcs/letsencrypt-nginx-proxy-companion
volumes:
- ./certs/:/etc/nginx/certs:rw
- /var/run/docker.sock:/var/run/docker.sock:ro
volumes_from:
- proxy
container_name: letsencrypt
networks:
- default
- 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