Skip to content

Instantly share code, notes, and snippets.

@amatiasq
Last active March 15, 2024 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amatiasq/84b94c796468a391f29fabc8378cf309 to your computer and use it in GitHub Desktop.
Save amatiasq/84b94c796468a391f29fabc8378cf309 to your computer and use it in GitHub Desktop.
version: '2'
services:
nginx-proxy:
image: nginxproxy/nginx-proxy
ports:
- 80:80
- 443:443
volumes:
- vhost:/etc/nginx/vhost.d
- certs:/etc/nginx/certs:ro
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./logs:/var/log/nginx
networks:
- exposed
acme-companion:
image: nginxproxy/acme-companion
volumes_from:
- nginx-proxy
volumes:
- certs:/etc/nginx/certs:rw
- acme:/etc/acme.sh
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- exposed
networks:
exposed:
name: exposed
driver: bridge
volumes:
vhost:
certs:
acme:
version: '3.5'
services:
nginx:
image: nginx
expose:
- 80
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf
- ./logs:/var/log/nginx
- ./www:/www:ro
environment:
- VIRTUAL_HOST=amatiasq.com,www.amatiasq.com
- LETSENCRYPT_HOST=amatiasq.com,www.amatiasq.com
- LETSENCRYPT_EMAIL=amatiasq@gmail.com
networks:
- exposed
networks:
exposed:
external: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment