fix: simplify docker-compose to non-Swarm mode (match whatsapp-api pattern)

Remove external network and Swarm deploy labels; use expose + service-level
Traefik labels like the existing whatsapp-api container.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-20 17:00:07 -03:00
parent 995f211288
commit c5bfda5918
+14 -38
View File
@@ -1,48 +1,24 @@
version: '3.8'
services:
api_zdg_oficial:
image: chrishubert/whatsapp-oficial-api:latest
build:
context: .
dockerfile: Dockerfile
networks:
- comunidadezdg
whatsapp-api-oficial:
build: .
image: whatsapp-api-oficial:latest
container_name: whatsapp-api-oficial
restart: unless-stopped
env_file:
- .env
volumes:
- api_zdg_oficial_data:/usr/src/app/data
environment:
- PORT=3001
- API_KEY=${API_KEY}
- BASE_WEBHOOK_URL=${BASE_WEBHOOK_URL}
- META_WEBHOOK_VERIFY_TOKEN=${META_WEBHOOK_VERIFY_TOKEN}
- ENABLE_SWAGGER_ENDPOINT=TRUE
- DB_PATH=/usr/src/app/data/accounts.db
deploy:
mode: replicated
replicas: 1
placement:
constraints:
- node.role == manager
resources:
limits:
cpus: "0.5"
memory: 256M
expose:
- "3001"
labels:
- traefik.enable=true
- traefik.http.routers.api_zdg_oficial.rule=Host(`apimsgoficial.neuralsys.com.br`)
- traefik.http.routers.api_zdg_oficial.entrypoints=websecure
- traefik.http.routers.api_zdg_oficial.tls.certresolver=letsencryptresolver
- traefik.http.routers.api_zdg_oficial.priority=1
- traefik.http.routers.api_zdg_oficial.service=api_zdg_oficial
- traefik.http.services.api_zdg_oficial.loadbalancer.server.port=3001
- traefik.http.services.api_zdg_oficial.loadbalancer.passHostHeader=true
- traefik.http.routers.whatsapp-api-oficial.rule=Host(`apimsgoficial.neuralsys.com.br`)
- traefik.http.routers.whatsapp-api-oficial.entrypoints=websecure
- traefik.http.routers.whatsapp-api-oficial.tls=true
- traefik.http.routers.whatsapp-api-oficial.tls.certresolver=letsencrypt
- traefik.http.services.whatsapp-api-oficial.loadbalancer.server.port=3001
volumes:
api_zdg_oficial_data:
external: true
name: api_zdg_oficial_data
networks:
comunidadezdg:
name: comunidadezdg
external: true