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:
+16
-40
@@ -1,48 +1,24 @@
|
|||||||
version: '3.8'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
api_zdg_oficial:
|
whatsapp-api-oficial:
|
||||||
image: chrishubert/whatsapp-oficial-api:latest
|
build: .
|
||||||
build:
|
image: whatsapp-api-oficial:latest
|
||||||
context: .
|
container_name: whatsapp-api-oficial
|
||||||
dockerfile: Dockerfile
|
restart: unless-stopped
|
||||||
networks:
|
env_file:
|
||||||
- comunidadezdg
|
- .env
|
||||||
volumes:
|
volumes:
|
||||||
- api_zdg_oficial_data:/usr/src/app/data
|
- api_zdg_oficial_data:/usr/src/app/data
|
||||||
environment:
|
expose:
|
||||||
- PORT=3001
|
- "3001"
|
||||||
- API_KEY=${API_KEY}
|
labels:
|
||||||
- BASE_WEBHOOK_URL=${BASE_WEBHOOK_URL}
|
- traefik.enable=true
|
||||||
- META_WEBHOOK_VERIFY_TOKEN=${META_WEBHOOK_VERIFY_TOKEN}
|
- traefik.http.routers.whatsapp-api-oficial.rule=Host(`apimsgoficial.neuralsys.com.br`)
|
||||||
- ENABLE_SWAGGER_ENDPOINT=TRUE
|
- traefik.http.routers.whatsapp-api-oficial.entrypoints=websecure
|
||||||
- DB_PATH=/usr/src/app/data/accounts.db
|
- traefik.http.routers.whatsapp-api-oficial.tls=true
|
||||||
deploy:
|
- traefik.http.routers.whatsapp-api-oficial.tls.certresolver=letsencrypt
|
||||||
mode: replicated
|
- traefik.http.services.whatsapp-api-oficial.loadbalancer.server.port=3001
|
||||||
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
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
api_zdg_oficial_data:
|
api_zdg_oficial_data:
|
||||||
external: true
|
external: true
|
||||||
name: api_zdg_oficial_data
|
name: api_zdg_oficial_data
|
||||||
|
|
||||||
networks:
|
|
||||||
comunidadezdg:
|
|
||||||
name: comunidadezdg
|
|
||||||
external: true
|
|
||||||
|
|||||||
Reference in New Issue
Block a user