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
Co-authored-by: Cursor <cursoragent@cursor.com>
54 lines
1.1 KiB
YAML
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:
|