Add nginx-proxy
This commit is contained in:
parent
278c4018ea
commit
6fe27ae76f
3 changed files with 81 additions and 0 deletions
51
nginx-proxy/docker-compose.yaml
Normal file
51
nginx-proxy/docker-compose.yaml
Normal file
|
@ -0,0 +1,51 @@
|
|||
version: '2.1'
|
||||
services:
|
||||
nginx:
|
||||
image: nginx
|
||||
container_name: nginx
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
volumes:
|
||||
- nginx_conf:/etc/nginx/conf.d
|
||||
- certs:/etc/nginx/certs
|
||||
- vhost:/etc/nginx/vhost.d
|
||||
- html:/usr/share/nginx/html
|
||||
networks:
|
||||
- webproxy
|
||||
|
||||
dockergen:
|
||||
image: nginxproxy/docker-gen
|
||||
container_name: dockergen
|
||||
command: -notify-sighup nginx -watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl
|
||||
/etc/nginx/conf.d/default.conf
|
||||
volumes_from:
|
||||
- nginx
|
||||
volumes:
|
||||
- /var/run/docker.sock:/tmp/docker.sock:ro
|
||||
# - ./nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl # use this for the file next to this file
|
||||
- nginx-tmpl:/etc/docker-gen/templates/ # use this for a named volume containing the file
|
||||
networks:
|
||||
- webproxy
|
||||
|
||||
acme-companion:
|
||||
image: nginxproxy/acme-companion
|
||||
volumes_from:
|
||||
- nginx
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
- acme:/etc/acme.sh
|
||||
environment:
|
||||
- NGINX_DOCKER_GEN_CONTAINER=dockergen
|
||||
# - ACME_CA_URI=https://acme-staging-v02.api.letsencrypt.org/directory # set this for staging environment from letsencrypt
|
||||
|
||||
volumes:
|
||||
nginx_conf:
|
||||
certs:
|
||||
vhost:
|
||||
html:
|
||||
acme:
|
||||
|
||||
networks:
|
||||
webproxy:
|
||||
name: webproxy
|
Loading…
Add table
Add a link
Reference in a new issue