98 lines
2.5 KiB
YAML
98 lines
2.5 KiB
YAML
name: yuqei-contract-v2
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
environment:
|
|
POSTGRES_USER: ${POSTGRES_USER:-yuqei}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-yuqei-local}
|
|
POSTGRES_DB: ${POSTGRES_DB:-yuqei_v2}
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER:-yuqei} -d $${POSTGRES_DB:-yuqei_v2}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
ports:
|
|
- "6379:6379"
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
minio:
|
|
image: minio/minio:latest
|
|
command: server /data --console-address ":9001"
|
|
environment:
|
|
MINIO_ROOT_USER: ${MINIO_ROOT_USER:-yuqei-minio}
|
|
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-yuqei-minio-local}
|
|
ports:
|
|
- "9000:9000"
|
|
- "9001:9001"
|
|
volumes:
|
|
- minio-data:/data
|
|
healthcheck:
|
|
test: ["CMD", "mc", "ready", "local"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
contract-api:
|
|
build:
|
|
context: ../..
|
|
dockerfile: infra/docker/contract-api.Dockerfile
|
|
environment:
|
|
CONTRACT_API_ENVIRONMENT: local
|
|
CONTRACT_API_DATABASE_URL: postgresql+psycopg://yuqei:yuqei-local@postgres:5432/yuqei_v2
|
|
CONTRACT_API_REDIS_URL: redis://redis:6379/0
|
|
CONTRACT_API_AI_PLATFORM_BASE_URL: http://ai-platform-api:8101
|
|
ports:
|
|
- "8100:8100"
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
|
|
ai-platform-api:
|
|
build:
|
|
context: ../..
|
|
dockerfile: infra/docker/ai-platform-api.Dockerfile
|
|
environment:
|
|
AI_PLATFORM_ENVIRONMENT: local
|
|
AI_PLATFORM_DATABASE_URL: postgresql+psycopg://yuqei:yuqei-local@postgres:5432/yuqei_v2
|
|
AI_PLATFORM_REDIS_URL: redis://redis:6379/1
|
|
AI_PLATFORM_PROVIDER_CONFIG_SOURCE: database
|
|
ports:
|
|
- "8101:8101"
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
|
|
worker:
|
|
build:
|
|
context: ../..
|
|
dockerfile: infra/docker/worker.Dockerfile
|
|
environment:
|
|
YUQEI_WORKER_ENVIRONMENT: local
|
|
YUQEI_WORKER_REDIS_URL: redis://redis:6379/2
|
|
YUQEI_WORKER_OBJECT_STORAGE_ENDPOINT: http://minio:9000
|
|
depends_on:
|
|
redis:
|
|
condition: service_healthy
|
|
minio:
|
|
condition: service_healthy
|
|
|
|
volumes:
|
|
postgres-data:
|
|
minio-data:
|