-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
51 lines (48 loc) · 1.71 KB
/
Copy pathdocker-compose.yml
File metadata and controls
51 lines (48 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
services:
# ── PostgreSQL ──────────────────────────────────────────────────────────────
postgres:
image: postgres:16-alpine
container_name: monorepo_postgres
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-monorepo}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-monorepo}
POSTGRES_DB: ${POSTGRES_DB:-monorepo}
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-monorepo} -d ${POSTGRES_DB:-monorepo}"]
interval: 5s
timeout: 5s
retries: 10
# ── FastAPI Backend ─────────────────────────────────────────────────────────
api:
build:
context: .
dockerfile: apps/api/Dockerfile
container_name: monorepo_api
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
environment:
DATABASE_URL: postgresql+psycopg2://${POSTGRES_USER:-monorepo}:${POSTGRES_PASSWORD:-monorepo}@postgres:5432/${POSTGRES_DB:-monorepo}
MEMORY_DB_PATH: .data/chromadb
LOG_JSON: "true"
LOG_LEVEL: ${LOG_LEVEL:-INFO}
DEBUG: ${DEBUG:-false}
volumes:
- chromadb_data:/app/apps/api/.data/chromadb
ports:
- "8000:8000"
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8000/health || exit 1"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
volumes:
postgres_data:
chromadb_data: