Files
WonderQ-Project/WonderQ-Admin/docker-compose.yml
2026-08-28 09:52:11 +08:00

59 lines
1.6 KiB
YAML

services:
api:
build: .
container_name: wonderq-admin-api
restart: unless-stopped
environment:
DATABASE_URL: postgresql://miniapp:miniapp_dev_password@postgres:5432/miniapp
JWT_SECRET: replace-with-a-long-random-secret-before-production
REDIS_URL: redis://redis:6379/0
PORT: 4000
LOG_LEVEL: info
WECHAT_MINIAPP_APPID: ${WECHAT_MINIAPP_APPID:-}
WECHAT_MINIAPP_SECRET: ${WECHAT_MINIAPP_SECRET:-}
OSS_ACCESS_KEY_ID: ${OSS_ACCESS_KEY_ID:-}
OSS_ACCESS_KEY_SECRET: ${OSS_ACCESS_KEY_SECRET:-}
OSS_ENDPOINT: ${OSS_ENDPOINT:-}
OSS_PUBLIC_BASE_URL: ${OSS_PUBLIC_BASE_URL:-}
OSS_BUCKET_NAME: ${OSS_BUCKET_NAME:-}
ports:
- "4000:4000"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
healthcheck:
test: ["CMD-SHELL", "curl -fsS http://localhost:4000/health || exit 1"]
interval: 10s
timeout: 5s
retries: 10
postgres:
image: postgres:16-alpine
container_name: wonderq-admin-postgres
restart: unless-stopped
environment:
POSTGRES_DB: miniapp
POSTGRES_USER: miniapp
POSTGRES_PASSWORD: miniapp_dev_password
ports:
- "5433:5432"
volumes:
- miniapp-postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U miniapp -d miniapp"]
interval: 5s
timeout: 5s
retries: 10
redis:
image: redis:7-alpine
container_name: wonderq-admin-redis
restart: unless-stopped
ports:
- "6380:6379"
volumes:
miniapp-postgres-data: