services: nginx: container_name: cactoz-nginx build: context: . dockerfile: nginx/Dockerfile networks: - internal - proxy depends_on: - gameserver restart: unless-stopped security_opt: - no-new-privileges:true cap_drop: - ALL cap_add: - NET_BIND_SERVICE healthcheck: test: ["CMD-SHELL", "wget -qO /dev/null http://127.0.0.1/ || exit 1"] interval: 30s timeout: 5s retries: 3 start_period: 5s logging: driver: json-file options: max-size: "10m" max-file: "3" deploy: resources: limits: memory: 128M cpus: "0.5" gameserver: build: ./gameserver networks: - internal restart: unless-stopped security_opt: - no-new-privileges:true cap_drop: - ALL healthcheck: test: ["CMD-SHELL", "bash -c 'echo > /dev/tcp/127.0.0.1/9001'"] interval: 30s timeout: 5s retries: 3 start_period: 10s logging: driver: json-file options: max-size: "10m" max-file: "3" deploy: resources: limits: memory: 256M cpus: "1.0" networks: internal: # уже создана Caddy-стеком; сюда только подключаемся proxy: external: true