Files
co-lite/local/docker-compose.yml
T
ngqileandClaude Opus 5.5 9f1b8de04d feat: whatsapp send, templates and media proxy
- MetaClient: text and template sends, approved templates with bounded paging, streamed media with a 100 MB cap.
- Send endpoint: 24-hour window, template params and supported checks before Meta; pending then sent or failed with Meta's code and title.
- Template sync per company and nightly at 03:30 KL; a failed fetch keeps existing rows.
- Media proxy: 404 without access, 410 when Meta no longer holds the file.
- Mock: Graph send, templates, media and bearer checks; /simulate/inbound and /simulate/status sign with the company secret.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
2026-12-02 11:03:56 +08:00

137 lines
4.5 KiB
YAML

# Local dev stack. Service names match the Kubernetes service names.
name: co-lite
services:
mysql:
image: mysql:8.0
# Match the Tastefully server: dumped functions are not declared DETERMINISTIC, and some tables exceed strict row-size limits.
command: --log-bin-trust-function-creators=1 --innodb-strict-mode=OFF
environment:
MYSQL_ROOT_PASSWORD: ${MYSQLPWD}
ports: ["3307:3306"]
volumes:
- mysql-data:/var/lib/mysql
- ./seed:/docker-entrypoint-initdb.d:ro
healthcheck:
# TCP, not the socket: the init-time server has networking off, so this only passes after seeding.
test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1", "-p${MYSQLPWD}"]
interval: 5s
retries: 60
redis:
image: redis:7
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
retries: 20
pubsub:
image: gcr.io/google.com/cloudsdktool/google-cloud-cli:emulators
command: gcloud beta emulators pubsub start --host-port=0.0.0.0:8085 --project=co-lite-local
healthcheck:
test: ["CMD", "curl", "-sf", "http://localhost:8085"]
interval: 5s
retries: 30
pubsub-init:
image: curlimages/curl:8.11.1
entrypoint: ["sh", "/pubsub/init.sh"]
volumes:
- ./pubsub:/pubsub:ro
depends_on:
pubsub: {condition: service_healthy}
api-gateway:
build:
context: ../solvway-api-gateway
args: {BUILD_PROFILE: local}
env_file: .env
depends_on:
mysql: {condition: service_healthy}
redis: {condition: service_healthy}
pubsub-init: {condition: service_completed_successfully}
ports: ["8081:80"]
volumes:
- ./appkeys.json:/deployments/appkeys/appkeys.json:ro
mobile-api:
build:
context: ../solvway-mobile-api
args: {BUILD_PROFILE: local}
env_file: .env
depends_on:
mysql: {condition: service_healthy}
redis: {condition: service_healthy}
pubsub-init: {condition: service_completed_successfully}
ports: ["8080:80"]
service-auth:
build:
context: ../solvway-services-auth
args: {BUILD_PROFILE: local}
env_file: .env
depends_on:
mysql: {condition: service_healthy}
redis: {condition: service_healthy}
pubsub-init: {condition: service_completed_successfully}
service-system:
build:
context: ../solvway-services-system
args: {BUILD_PROFILE: local}
env_file: .env
depends_on:
mysql: {condition: service_healthy}
redis: {condition: service_healthy}
pubsub-init: {condition: service_completed_successfully}
service-counter:
build:
context: ../solvway-services-counter
args: {BUILD_PROFILE: local}
env_file: .env
depends_on:
mysql: {condition: service_healthy}
redis: {condition: service_healthy}
pubsub-init: {condition: service_completed_successfully}
service-member:
build:
context: ../solvway-services-member
args: {BUILD_PROFILE: local}
env_file: .env
depends_on:
mysql: {condition: service_healthy}
redis: {condition: service_healthy}
pubsub-init: {condition: service_completed_successfully}
service-log:
build:
context: ../solvway-services-log
args: {BUILD_PROFILE: local}
env_file: .env
depends_on:
mysql: {condition: service_healthy}
redis: {condition: service_healthy}
pubsub-init: {condition: service_completed_successfully}
service-email:
build:
context: ../solvway-services-email
args: {BUILD_PROFILE: local}
env_file: .env
depends_on:
mysql: {condition: service_healthy}
redis: {condition: service_healthy}
pubsub-init: {condition: service_completed_successfully}
service-whatsapp:
build:
context: ../solvway-services-whatsapp
args: {BUILD_PROFILE: local}
env_file: .env
depends_on:
mysql: {condition: service_healthy}
whatsapp-mock:
build: ./whatsapp-mock
environment:
WEBHOOK_URL: http://mobile-api/api/public/whatsapp/webhook
WHATSAPP_COMPANIES: ${WHATSAPP_COMPANIES}
WHATSAPP_INS_PHONE_NUMBER_ID: ${WHATSAPP_INS_PHONE_NUMBER_ID}
WHATSAPP_INS_WABA_ID: ${WHATSAPP_INS_WABA_ID}
WHATSAPP_INS_ACCESS_TOKEN: ${WHATSAPP_INS_ACCESS_TOKEN}
WHATSAPP_INS_APP_SECRET: ${WHATSAPP_INS_APP_SECRET}
WHATSAPP_CV_PHONE_NUMBER_ID: ${WHATSAPP_CV_PHONE_NUMBER_ID}
WHATSAPP_CV_WABA_ID: ${WHATSAPP_CV_WABA_ID}
WHATSAPP_CV_ACCESS_TOKEN: ${WHATSAPP_CV_ACCESS_TOKEN}
WHATSAPP_CV_APP_SECRET: ${WHATSAPP_CV_APP_SECRET}
volumes:
mysql-data: