version: '3.0' networks: br-d2ray: external: false driver: bridge driver_opts: com.docker.network.bridge.name: br-d2ray enable_ipv6: false ipam: driver: default config: - subnet: 172.127.127.0/24 services: d2ray_nginx: container_name: d2ray_nginx image: linuxserver/swag restart: unless-stopped cap_add: - NET_ADMIN networks: - br-d2ray environment: - PUID={{ uid }} - PGID={{ gid }} - TZ=US/Eastern - URL={{ domain }} - SUBDOMAINS={{ subdomain }} - VALIDATION=http - EMAIL=dummy@dummy.com - DHLEVEL=2048 - ONLY_SUBDOMAINS={{ subdomain_only }} - STAGING=false ports: - 80:80 volumes: - ./nginx:/config healthcheck: test: ["CMD", "curl", "-f", "http://{{ subdomain }}.{{ domain }}:80"] interval: 5s timeout: 3s retries: 30 d2ray_xray: container_name: d2ray_xray image: teddysun/xray restart: unless-stopped depends_on: d2ray_nginx: condition: service_healthy networks: - br-d2ray ports: - 443:443 volumes: - ./nginx/etc:/le-etc - ./xray:/etc/xray {{ watchtower }}