-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
86 lines (82 loc) · 2.45 KB
/
docker-compose.prod.yml
File metadata and controls
86 lines (82 loc) · 2.45 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
services:
postgres:
image: pgduckdb/pgduckdb:16-main
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-oe}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB:-openestimate}
volumes:
- pg_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-oe} -d ${POSTGRES_DB:-openestimate}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 15s
backend:
build:
context: .
dockerfile: deploy/docker/Dockerfile.backend
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
environment:
DATABASE_URL: postgresql+asyncpg://${POSTGRES_USER:-oe}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB:-openestimate}
DATABASE_SYNC_URL: postgresql://${POSTGRES_USER:-oe}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB:-openestimate}
REDIS_URL: ${REDIS_URL:-}
JWT_SECRET: ${JWT_SECRET:?Set JWT_SECRET}
JWT_ALGORITHM: ${JWT_ALGORITHM:-HS256}
JWT_EXPIRE_MINUTES: ${JWT_EXPIRE_MINUTES:-60}
APP_ENV: production
APP_DEBUG: "false"
LOG_LEVEL: ${LOG_LEVEL:-INFO}
ALLOWED_ORIGINS: ${ALLOWED_ORIGINS:-http://localhost}
S3_ENDPOINT: ${S3_ENDPOINT:-}
S3_ACCESS_KEY: ${S3_ACCESS_KEY:-}
S3_SECRET_KEY: ${S3_SECRET_KEY:-}
S3_BUCKET: ${S3_BUCKET:-openestimate}
QDRANT_URL: ${QDRANT_URL:-}
expose:
- "8000"
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/api/health')"]
interval: 15s
timeout: 5s
retries: 5
start_period: 20s
frontend:
build:
context: .
dockerfile: deploy/docker/Dockerfile.frontend
restart: unless-stopped
depends_on:
backend:
condition: service_healthy
ports:
- "${FRONTEND_PORT:-80}:80"
healthcheck:
test: ["CMD", "wget", "-qO", "/dev/null", "http://localhost:80/"]
interval: 15s
timeout: 5s
retries: 3
start_period: 10s
qdrant:
image: qdrant/qdrant:v1.12.5
restart: unless-stopped
profiles:
- ai
volumes:
- qdrant_data:/qdrant/storage
expose:
- "6333"
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:6333/readyz || exit 1"]
interval: 15s
timeout: 5s
retries: 3
start_period: 10s
volumes:
pg_data:
qdrant_data: