Files
wecom-ai-assistant/docker-compose.yml
bujie9527 b715755b76
Some checks failed
Build and Deploy / test-backend (push) Has been cancelled
Build and Deploy / build-backend (push) Has been cancelled
Build and Deploy / build-admin (push) Has been cancelled
Deploy to Production / build-backend (push) Has been cancelled
Deploy to Production / deploy (push) Has been cancelled
feat: backend env config upgrade - multi-env (dev/prod), DB_* support, Docker compatible
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06 12:07:02 +08:00

54 lines
1.1 KiB
YAML

services:
db:
image: postgres:16-alpine
environment:
POSTGRES_USER: wecom
POSTGRES_PASSWORD: wecom_secret
POSTGRES_DB: wecom_ai
volumes:
- pgdata:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U wecom -d wecom_ai"]
interval: 5s
timeout: 5s
retries: 5
backend:
build:
context: ./backend
dockerfile: Dockerfile
env_file: .env
environment:
DATABASE_URL: postgresql+asyncpg://wecom:wecom_secret@db:5432/wecom_ai
DATABASE_URL_SYNC: postgresql://wecom:wecom_secret@db:5432/wecom_ai
ports:
- "8000:8000"
depends_on:
db:
condition: service_healthy
admin:
build:
context: ./admin
dockerfile: Dockerfile
env_file: .env
ports:
- "3000:3000"
depends_on:
- backend
nginx:
image: nginx:alpine
ports:
- "80:80"
volumes:
- ./deploy/nginx.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
- backend
- admin
volumes:
pgdata: