1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
| version: '3'
services:
nginx:
image: nginx
restart: always
volumes:
- "./etc/nginx/conf.d/:/etc/nginx/conf.d/"
- "./nginx/vhost.d:/etc/nginx/vhost.d"
- "./nginx/html:/usr/share/nginx/html"
- "./nginx/certs:/etc/nginx/certs:ro"
labels:
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
environment:
VIRTUAL_HOST: monsite.com
LETSENCRYPT_HOST: monsite.com
LETSENCRYPT_EMAIL: mon-email@email.com
ports:
- "80:80"
- "443:443"
nginx-gen:
image: jwilder/docker-gen
restart: always
labels:
com.github.jrcs.letsencrypt_nginx_proxy_companion.docker_gen: "true"
volumes:
- "./nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro"
- "/var/run/docker.sock:/tmp/docker.sock:ro"
- "./etc/nginx/conf.d/:/etc/nginx/conf.d/"
- "./nginx/vhost.d:/etc/nginx/vhost.d"
- "./nginx/html:/usr/share/nginx/html"
- "./nginx/certs:/etc/nginx/certs:ro"
labels:
com.github.jrcs.letsencrypt_nginx_proxy_companion.docker_gen: "true"
nginx-letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion
restart: always
volumes:
- "./etc/nginx/conf.d/:/etc/nginx/conf.d/"
- "./nginx/vhost.d:/etc/nginx/vhost.d"
- "./nginx/html:/usr/share/nginx/html"
- "./nginx/certs:/etc/nginx/certs:ro"
- "/var/run/docker.sock:/tmp/docker.sock:ro"
depends_on:
- nginx-gen |
Partager