From c5bfda591818bdc1bf05899f9c7ab8c245a7316d Mon Sep 17 00:00:00 2001 From: Ecio Date: Sat, 20 Jun 2026 17:00:07 -0300 Subject: [PATCH] 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 --- docker-compose.yml | 56 +++++++++++++--------------------------------- 1 file changed, 16 insertions(+), 40 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 82e174a..27675ed 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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 - 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 + expose: + - "3001" + labels: + - traefik.enable=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