version: '3.8' services: openwa: # IMPORTANT: Replace with your specific OpenWA image if different. # This is a commonly used one, but your setup might require another. image: devlikeapro/open-wa-api:latest ports: # Default port for OpenWA API is often 8080. Adjust if your image uses a different one. - "8080:8080" # Port for the webhook if OpenWA serves it directly. # This might also be configured via environment variables for OpenWA. - "3000:3000" # Assuming OpenWA's webhook might be on 3000, adjust as needed environment: # Add any necessary environment variables for OpenWA here # For example: # - WEBHOOK_URL=http://whatsapp-router:3001/webhook # The actual variable names will depend on the OpenWA image being used. - SERVER_PORT=8080 # Example, may not be needed if image defaults correctly volumes: # Persist session data for OpenWA to avoid re-scanning QR code on restart - openwa_data:/app/session # networks: # - conversation_net chat-ui: build: context: ./chat-ui dockerfile: Dockerfile ports: - "3002:3000" # Expose Chat UI on host port 3002, container port 3000 environment: # Example: Endpoint for the LLM agent # - LLM_AGENT_URL=http://your-llm-agent-service/api - NODE_ENV=development # depends_on: # - openwa # If Chat UI needs to directly interact with OpenWA # networks: # - conversation_net whatsapp-router: build: context: ./whatsapp-router dockerfile: Dockerfile ports: - "3001:3001" # Expose WhatsApp Router on host port 3001, container port 3001 environment: # URL for OpenWA API - OPENWA_API_URL=http://openwa:8080 # URL where OpenWA should send webhook events # This should match what OpenWA is configured to call - OPENWA_WEBHOOK_TARGET=http://whatsapp-router:3001/webhook # Example: Endpoint for the LLM agent (if router talks to it) # - LLM_AGENT_URL=http://your-llm-agent-service/api - NODE_ENV=development depends_on: - openwa # Router needs OpenWA to be up # networks: # - conversation_net volumes: openwa_data: # Named volume for OpenWA session data # Optional: Define a shared network # networks: # conversation_net: # driver: bridge