new arch
This commit is contained in:
@@ -1,55 +1,70 @@
|
||||
services:
|
||||
dnsmasq:
|
||||
image: jpillora/dnsmasq
|
||||
container_name: dnsmasq
|
||||
restart: always
|
||||
ports:
|
||||
- "53:53/udp"
|
||||
- "53:53/tcp"
|
||||
volumes:
|
||||
- ./dnsmasq.conf:/etc/dnsmasq.conf:ro
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
networks:
|
||||
- devnet
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
nginx-proxy:
|
||||
image: nginxproxy/nginx-proxy:alpine
|
||||
container_name: nginx-proxy
|
||||
restart: always
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
volumes:
|
||||
- /var/run/docker.sock:/tmp/docker.sock:ro
|
||||
- ./certs:/etc/nginx/certs:ro
|
||||
- ./vhost.d:/etc/nginx/vhost.d:ro
|
||||
- ./html:/usr/share/nginx/html:rw
|
||||
- ./nginx/certs:/etc/nginx/certs:ro
|
||||
- ./nginx/vhost.d:/etc/nginx/vhost.d:ro
|
||||
- ./nginx/html:/usr/share/nginx/html:rw
|
||||
networks:
|
||||
- devnet
|
||||
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"
|
||||
- "com.github.nginx-proxy.nginx-proxy=true"
|
||||
|
||||
nginx-proxy-companion:
|
||||
image: nginxproxy/acme-companion
|
||||
container_name: nginx-proxy-companion
|
||||
restart: always
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
- ./certs:/etc/nginx/certs:rw
|
||||
- ./nginx/certs:/etc/nginx/certs:rw
|
||||
- ./acme:/etc/acme.sh
|
||||
- ./vhost.d:/etc/nginx/vhost.d
|
||||
- ./html:/usr/share/nginx/html
|
||||
- ./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
|
||||
|
||||
networks:
|
||||
devnet:
|
||||
external: true
|
||||
driver: bridge
|
||||
ipam:
|
||||
config:
|
||||
- subnet: ${SUBNET}
|
||||
gateway: ${GATEWAY}
|
||||
|
||||
volumes:
|
||||
acme:
|
||||
vhost.d:
|
||||
html:
|
||||
html:
|
||||
Reference in New Issue
Block a user