Update docker-compose.coolify.yml to enhance environment variable defaults and add Traefik rate limiting labels

This commit is contained in:
2025-12-27 20:00:49 -06:00
parent eece10388a
commit 8e41a88599

View File

@@ -5,15 +5,20 @@ services:
dockerfile: Dockerfile
image: ${DOCKER_IMAGE:-web-news:latest}
environment:
- PORT=${PORT:?8080}
- PORT=${PORT:-8080}
- NODE_ENV=production
- AUTH_MODE=multi
- AUTH_MODE=${AUTH_MODE:-multi}
- ALLOW_REGISTRATION=${ALLOW_REGISTRATION:-true}
# Coolify automatically populates SERVICE_URL_WEB_NEWS with the domain
- ALLOWED_ORIGINS=${SERVICE_URL_WEB_NEWS:-*}
- AUTH_FILE=/app/data/accounts.json
- HASHES_FILE=/app/data/client_hashes.json
volumes:
- web-news-data:/app/data
labels:
- "traefik.enable=true"
- "traefik.http.middlewares.web-news-ratelimit.ratelimit.average=100"
- "traefik.http.middlewares.web-news-ratelimit.ratelimit.burst=50"
security_opt:
- no-new-privileges:true
restart: unless-stopped