Files
whatsapp_bot/docker-compose.yml
2025-05-02 13:09:42 -06:00

42 lines
1.4 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# docker-compose.whatsapp.yml
version: "3.9"
services:
whatsapp-bot:
image: openwa/wa-automate:latest
container_name: whatsapp-bot
hostname: whatsapp-bot
init: true # evita zombies
restart: on-failure
environment:
## Identificá tu sesión y ajustá flags según necesidad
WA_SESSION_ID: "planillas" # cambia el nombre si querés varias instancias
WA_DISABLE_SPINS: "true" # quita el spinner del log
WA_API_KEY: ${WA_API_KEY} # token para llamadas REST
WA_WEBHOOK: "http://core-hr:3000/webhooks/whatsapp" # ejemplo de webhook interno
# WA_ALLOW_IPS: "10.0.0.0/24" # opcional: restringí IPs
volumes:
- whatsapp_sessions:/sessions # persiste el login QR
ports:
- "8080:8080" # API REST y socket
networks:
- principal # tu red docker ya existente
nucleo-bot:
build: ./nucleo-bot
depends_on:
- whatsapp-bot # nombre del servicio WA existente
environment:
BOT_API_URL: http://whatsapp-bot:3000 # mismo puerto expuesto por openwa
GROUP_ID: 120363203056794284@g.us
REPLY_MSG: "que pedos" # cámbialo cuando quieras
networks:
- default # o la red que use tu stack
volumes:
whatsapp_sessions:
networks:
principal:
external: true