52 lines
1.1 KiB
YAML
52 lines
1.1 KiB
YAML
version: '3.9'
|
|
|
|
services:
|
|
nginx-proxy:
|
|
image: jwilder/nginx-proxy:alpine
|
|
labels:
|
|
- com.github.nginx-proxy.nginx
|
|
container_name: nginx-proxy
|
|
restart: unless-stopped
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
volumes:
|
|
- certs:/etc/nginx/certs
|
|
- vhost:/etc/nginx/vhost.d
|
|
- html:/usr/share/nginx/html
|
|
- ./vhost.d:/etc/nginx/vhost.d:ro
|
|
- /var/run/docker.sock:/tmp/docker.sock:ro
|
|
networks:
|
|
- proxy-tier
|
|
|
|
letsencrypt:
|
|
image: nginxproxy/acme-companion
|
|
container_name: nginx-proxy-acme
|
|
restart: unless-stopped
|
|
environment:
|
|
- NGINX_PROXY_CONTAINER=nginx-prox
|
|
#- ACME_CA_URI=https://acme-staging-v02.api.letsencrypt.org/directory
|
|
- DEFAULT_EMAIL=${LETSENCRYPT_EMAIL}
|
|
volumes_from:
|
|
- nginx-proxy
|
|
volumes:
|
|
- acme:/etc/acme.sh
|
|
- certs:/etc/nginx/certs
|
|
- vhost:/etc/nginx/vhost.d
|
|
- html:/usr/share/nginx/html
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
depends_on:
|
|
- nginx-proxy
|
|
networks:
|
|
- proxy-tier
|
|
|
|
volumes:
|
|
certs:
|
|
vhost:
|
|
html:
|
|
acme:
|
|
|
|
networks:
|
|
proxy-tier:
|
|
external: true
|