iloom/docker-compose.integrated.yml
Chever John 9c39c8cbd7
init: iloom WMS monorepo with K8s deployment manifests
Go workspace (go.work) with 5 microservices + shared library:
- gateway (8080), auth-service (8081), purchaser-service (8082)
- textile-service (8083), washing-service (8084)
- shared: proto definitions, common packages

Infrastructure: docker-compose for local dev, K8s manifests for
K3s cluster deployment (mysql/redis/etcd + traefik ingress).

Frontend (iloom-flatten) added as git submodule.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-14 11:33:31 +08:00

129 lines
3.6 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.

# iloom 集成模式 — 连接 muyu-apiserver 的 MySQL 和 gRPC
# 用法docker compose -f docker-compose.integrated.yml up -d
services:
gateway:
build:
context: .
dockerfile: gateway/Dockerfile
ports:
- "${GATEWAY_PORT:-8080}:8080"
environment:
- PORT=8080
- JWT_SECRET=${JWT_SECRET:-muyu-wms-jwt-secret-key-2026}
- AUTH_SERVICE_URL=http://auth-service:8081
- PURCHASER_SERVICE_URL=http://purchaser-service:8082
- TEXTILE_SERVICE_URL=http://textile-service:8083
- WASHING_SERVICE_URL=http://washing-service:8084
- ALLOW_ORIGINS=${ALLOW_ORIGINS:-http://localhost:3015}
depends_on:
auth-service:
condition: service_healthy
purchaser-service:
condition: service_healthy
textile-service:
condition: service_healthy
washing-service:
condition: service_healthy
networks:
- muyu-net
- default
auth-service:
build:
context: .
dockerfile: auth-service/Dockerfile
ports:
- "${AUTH_SERVICE_PORT:-8081}:8081"
environment:
- PORT=8081
- DB_DSN=root:muyu2026@tcp(muyu-mysql:3306)/muyu_wms?parseTime=true&charset=utf8mb4
- JWT_SECRET=${JWT_SECRET:-muyu-wms-jwt-secret-key-2026}
- JWT_REFRESH_SECRET=${JWT_REFRESH_SECRET:-muyu-wms-jwt-refresh-2026}
- MUYU_SYSTEM_RPC_ADDR=muyu-system-rpc:9001
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:8081/health"]
interval: 10s
timeout: 3s
retries: 5
networks:
- muyu-net
- default
purchaser-service:
build:
context: .
dockerfile: purchaser-service/Dockerfile
ports:
- "${PURCHASER_SERVICE_PORT:-8082}:8082"
environment:
- PORT=8082
- DB_DSN=root:muyu2026@tcp(muyu-mysql:3306)/muyu_wms?parseTime=true&charset=utf8mb4
- INTERNAL_SERVICE_KEY=${INTERNAL_SERVICE_KEY:-internal-service-shared-secret}
- MUYU_INVENTORY_RPC_ADDR=muyu-inventory-rpc:9002
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:8082/health"]
interval: 10s
timeout: 3s
retries: 5
networks:
- muyu-net
- default
textile-service:
build:
context: .
dockerfile: textile-service/Dockerfile
ports:
- "${TEXTILE_SERVICE_PORT:-8083}:8083"
environment:
- PORT=8083
- DB_DSN=root:muyu2026@tcp(muyu-mysql:3306)/muyu_wms?parseTime=true&charset=utf8mb4
- INTERNAL_SERVICE_KEY=${INTERNAL_SERVICE_KEY:-internal-service-shared-secret}
- PURCHASER_SERVICE_URL=http://purchaser-service:8082
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:8083/health"]
interval: 10s
timeout: 3s
retries: 5
networks:
- muyu-net
- default
washing-service:
build:
context: .
dockerfile: washing-service/Dockerfile
ports:
- "${WASHING_SERVICE_PORT:-8084}:8084"
environment:
- PORT=8084
- DB_DSN=root:muyu2026@tcp(muyu-mysql:3306)/muyu_wms?parseTime=true&charset=utf8mb4
- INTERNAL_SERVICE_KEY=${INTERNAL_SERVICE_KEY:-internal-service-shared-secret}
- PURCHASER_SERVICE_URL=http://purchaser-service:8082
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:8084/health"]
interval: 10s
timeout: 3s
retries: 5
networks:
- muyu-net
- default
frontend:
build:
context: .
dockerfile: iloom-flatten/Dockerfile
ports:
- "${FRONTEND_PORT:-3015}:3015"
depends_on:
gateway:
condition: service_started
networks:
- default
networks:
muyu-net:
external: true
name: deploy_default