2026-02-13 01:47:50 +03:00
|
|
|
version: '3.8'
|
2025-11-21 15:52:02 +03:00
|
|
|
|
2026-02-13 01:47:50 +03:00
|
|
|
services:
|
2025-11-21 15:52:02 +03:00
|
|
|
nginx-proxy:
|
|
|
|
|
image: nginxproxy/nginx-proxy:alpine
|
|
|
|
|
container_name: nginx-proxy
|
2026-02-13 01:47:50 +03:00
|
|
|
restart: unless-stopped
|
2025-11-21 15:52:02 +03:00
|
|
|
ports:
|
|
|
|
|
- "80:80"
|
|
|
|
|
- "443:443"
|
|
|
|
|
volumes:
|
|
|
|
|
- /var/run/docker.sock:/tmp/docker.sock:ro
|
2026-02-13 01:47:50 +03:00
|
|
|
- ./nginx/certs:/etc/nginx/certs:ro
|
|
|
|
|
- ./nginx/vhost.d:/etc/nginx/vhost.d:ro
|
|
|
|
|
- ./nginx/html:/usr/share/nginx/html:rw
|
2025-11-21 15:52:02 +03:00
|
|
|
networks:
|
2026-02-13 01:47:50 +03:00
|
|
|
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
|
2025-11-21 15:52:02 +03:00
|
|
|
labels:
|
2026-02-13 01:47:50 +03:00
|
|
|
- "com.github.nginx-proxy.nginx-proxy=true"
|
2025-11-21 15:52:02 +03:00
|
|
|
|
|
|
|
|
nginx-proxy-companion:
|
|
|
|
|
image: nginxproxy/acme-companion
|
|
|
|
|
container_name: nginx-proxy-companion
|
2026-02-13 01:47:50 +03:00
|
|
|
restart: unless-stopped
|
2025-11-21 15:52:02 +03:00
|
|
|
volumes:
|
|
|
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
2026-02-13 01:47:50 +03:00
|
|
|
- ./nginx/certs:/etc/nginx/certs:rw
|
2025-11-21 15:52:02 +03:00
|
|
|
- ./acme:/etc/acme.sh
|
2026-02-13 01:47:50 +03:00
|
|
|
- ./nginx/vhost.d:/etc/nginx/vhost.d:rw
|
2025-11-21 15:52:02 +03:00
|
|
|
networks:
|
|
|
|
|
- devnet
|
|
|
|
|
environment:
|
2026-02-13 01:47:50 +03:00
|
|
|
- DEFAULT_EMAIL=${LETSENCRYPT_EMAIL}
|
2025-11-21 15:52:02 +03:00
|
|
|
- NGINX_PROXY_CONTAINER=nginx-proxy
|
2026-02-13 01:47:50 +03:00
|
|
|
- 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
|
2025-11-21 15:52:02 +03:00
|
|
|
|
|
|
|
|
networks:
|
|
|
|
|
devnet:
|
2026-02-13 01:47:50 +03:00
|
|
|
driver: bridge
|
|
|
|
|
ipam:
|
|
|
|
|
config:
|
|
|
|
|
- subnet: ${SUBNET}
|
|
|
|
|
gateway: ${GATEWAY}
|
2025-11-21 15:52:02 +03:00
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
|
acme:
|
|
|
|
|
vhost.d:
|
2026-02-13 01:47:50 +03:00
|
|
|
html:
|