87 lines
1.9 KiB
YAML
87 lines
1.9 KiB
YAML
x-logging:
|
|
&default-logging
|
|
driver: local
|
|
options:
|
|
max-size: "1m"
|
|
max-file: "50"
|
|
|
|
x-opt-values:
|
|
&volume-opt
|
|
driver_opts: &options
|
|
type: "nfs"
|
|
o: "addr=${IP},rw"
|
|
|
|
services:
|
|
nginx-proxy:
|
|
image: jwilder/nginx-proxy
|
|
container_name: proxy
|
|
labels:
|
|
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
restart: always
|
|
volumes:
|
|
- conf:/etc/nginx/conf.d
|
|
- vhost:/etc/nginx/vhost.d
|
|
- passwords:/etc/nginx/htpasswd
|
|
- html:/usr/share/nginx/html
|
|
- certs:/etc/nginx/certs:ro
|
|
- /var/run/docker.sock:/tmp/docker.sock:ro
|
|
networks:
|
|
- reverse-proxy
|
|
logging: *default-logging
|
|
|
|
letsencrypt:
|
|
image: nginxproxy/acme-companion
|
|
container_name: letsencrypt
|
|
restart: always
|
|
volumes:
|
|
- conf:/etc/nginx/conf.d
|
|
- vhost:/etc/nginx/vhost.d
|
|
- html:/usr/share/nginx/html
|
|
- certs:/etc/nginx/certs:rw
|
|
- acme:/etc/acme.sh
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
environment:
|
|
NGINX_PROXY_CONTAINER: proxy
|
|
DEFAULT_EMAIL: ${DEFAULT_EMAIL}
|
|
networks:
|
|
- reverse-proxy
|
|
logging: *default-logging
|
|
|
|
networks:
|
|
reverse-proxy:
|
|
|
|
volumes:
|
|
acme:
|
|
<<: *volume-opt
|
|
driver_opts:
|
|
<<: *options
|
|
device: ":/mnt/path/nginx-proxy/acme"
|
|
certs:
|
|
<<: *volume-opt
|
|
driver_opts:
|
|
<<: *options
|
|
device: ":/mnt/path/nginx-proxy/certs"
|
|
conf:
|
|
<<: *volume-opt
|
|
driver_opts:
|
|
<<: *options
|
|
device: ":/mnt/path/nginx-proxy/conf"
|
|
html:
|
|
<<: *volume-opt
|
|
driver_opts:
|
|
<<: *options
|
|
device: ":/mnt/path/nginx-proxy/html"
|
|
passwords:
|
|
<<: *volume-opt
|
|
driver_opts:
|
|
<<: *options
|
|
device: ":/mnt/path/nginx-proxy/passwords"
|
|
vhost:
|
|
<<: *volume-opt
|
|
driver_opts:
|
|
<<: *options
|
|
device: ":/mnt/path/nginx-proxy/vhost"
|