Files
co-lite/local/docker-compose.yml
ngqileandClaude Opus 5.5 b3fcb2883a chore(local): seed schemas, reference data and a dev admin login
Schema from a Tastefully schema-only dump with data rows, AUTO_INCREMENT
counters and DEFINER users stripped. Reference rows from an allow-list of
service-system lookup tables (no user, member, attendance or order data;
supported_user_agent rows omitted). Adds a local company row and an
admin/colite-dev-admin login.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
2026-11-26 16:31:00 +08:00

117 lines
3.7 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}
volumes:
mysql-data: