Adds solvway-services-whatsapp with per-company WhatsApp settings (secrets masked), the gateway route /whatsapp/**, compose entries for the service and a local whatsapp-mock, the example env keys, and the service in CI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
126 lines
3.9 KiB
YAML
126 lines
3.9 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
|
|
volumes:
|
|
mysql-data:
|