87 lines
2.2 KiB
YAML
87 lines
2.2 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
nginx-proxy:
|
|
image: nginxproxy/nginx-proxy:alpine
|
|
container_name: nginx-proxy
|
|
restart: unless-stopped
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
volumes:
|
|
- /var/run/docker.sock:/tmp/docker.sock:ro
|
|
- ./nginx/certs:/etc/nginx/certs:ro
|
|
- ./nginx/vhost.d:/etc/nginx/vhost.d:ro
|
|
- ./nginx/html:/usr/share/nginx/html:rw
|
|
networks:
|
|
devnet:
|
|
ipv4_address: ${NGINX_IP}
|
|
environment:
|
|
- DEFAULT_HOST=welcome.${LOCAL_DOMAIN}
|
|
- HTTPS_METHOD=redirect
|
|
- SSL_POLICY=Mozilla-Modern
|
|
- DEFAULT_SSL_CERT=/etc/nginx/certs/default.crt
|
|
- DEFAULT_SSL_KEY=/etc/nginx/certs/default.key
|
|
labels:
|
|
- "com.github.nginx-proxy.nginx-proxy=true"
|
|
|
|
nginx-proxy-companion:
|
|
image: nginxproxy/acme-companion
|
|
container_name: nginx-proxy-companion
|
|
restart: unless-stopped
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
- ./nginx/certs:/etc/nginx/certs:rw
|
|
- ./acme:/etc/acme.sh
|
|
- ./nginx/vhost.d:/etc/nginx/vhost.d:rw
|
|
networks:
|
|
- devnet
|
|
environment:
|
|
- DEFAULT_EMAIL=${LETSENCRYPT_EMAIL}
|
|
- NGINX_PROXY_CONTAINER=nginx-proxy
|
|
- ACME_CA_URI=https://acme-staging-v02.api.letsencrypt.org/directory
|
|
depends_on:
|
|
- nginx-proxy
|
|
|
|
welcome:
|
|
image: nginx:alpine
|
|
container_name: welcome
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./nginx/html:/usr/share/nginx/html:ro
|
|
environment:
|
|
- VIRTUAL_HOST=welcome.${LOCAL_DOMAIN},welcome.${LOCAL_DOMAIN}.local
|
|
networks:
|
|
- devnet
|
|
depends_on:
|
|
- nginx-proxy
|
|
|
|
dnsmasq:
|
|
image: jpillora/dnsmasq
|
|
container_name: dnsmasq
|
|
restart: unless-stopped
|
|
ports:
|
|
- "53:53/udp"
|
|
- "53:53/tcp"
|
|
volumes:
|
|
- ./dnsmasq/dnsmasq.conf:/etc/dnsmasq.conf:ro
|
|
cap_add:
|
|
- NET_ADMIN
|
|
networks:
|
|
devnet:
|
|
ipv4_address: ${DNSMASQ_IP}
|
|
healthcheck:
|
|
test: ["CMD", "nslookup", "localhost", "127.0.0.1"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
|
|
networks:
|
|
devnet:
|
|
external: true
|
|
name: devnet
|
|
|
|
volumes:
|
|
acme:
|
|
vhost.d:
|
|
html: |