53 lines
1.3 KiB
YAML
53 lines
1.3 KiB
YAML
# 本機開發依賴:MongoDB(notification 持久化)、Redis(冪等/配額/異步重試/member OTP)
|
||
#
|
||
# 啟動:make deps-up
|
||
# 設定:etc/gateway.dev.yaml(搭配 make run-dev)
|
||
# 索引:首次啟動由 deploy/mongo/init 建立;既有 volume 可執行 make mongo-index
|
||
|
||
services:
|
||
mongo:
|
||
image: mongo:7
|
||
container_name: gateway-mongo
|
||
restart: unless-stopped
|
||
ports:
|
||
- "27017:27017"
|
||
environment:
|
||
MONGO_INITDB_DATABASE: gateway
|
||
volumes:
|
||
- mongo_data:/data/db
|
||
- ./deploy/mongo/init:/docker-entrypoint-initdb.d:ro
|
||
healthcheck:
|
||
test: ["CMD", "mongosh", "--quiet", "--eval", "db.adminCommand('ping').ok"]
|
||
interval: 5s
|
||
timeout: 5s
|
||
retries: 10
|
||
start_period: 10s
|
||
|
||
redis:
|
||
image: redis:7-alpine
|
||
container_name: gateway-redis
|
||
restart: unless-stopped
|
||
ports:
|
||
- "6379:6379"
|
||
command: ["redis-server", "--appendonly", "yes"]
|
||
volumes:
|
||
- redis_data:/data
|
||
healthcheck:
|
||
test: ["CMD", "redis-cli", "ping"]
|
||
interval: 5s
|
||
timeout: 3s
|
||
retries: 10
|
||
|
||
mailhog:
|
||
profiles: ["smtp"]
|
||
image: mailhog/mailhog:v1.0.1
|
||
container_name: gateway-mailhog
|
||
restart: unless-stopped
|
||
ports:
|
||
- "1025:1025" # SMTP
|
||
- "8025:8025" # Web UI
|
||
|
||
volumes:
|
||
mongo_data:
|
||
redis_data:
|