forked from Aashikhandelwal05/PrepIQ
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
61 lines (58 loc) · 1.77 KB
/
docker-compose.yml
File metadata and controls
61 lines (58 loc) · 1.77 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
services:
db:
image: postgres:16-alpine
environment:
POSTGRES_DB: prepiq
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d prepiq"]
interval: 10s
timeout: 5s
retries: 5
backend:
build:
context: .
dockerfile: Dockerfile.backend
environment:
DATABASE_URL: postgresql+psycopg://postgres:postgres@db:5432/prepiq
APP_SECRET: ${APP_SECRET:?Set APP_SECRET in your environment or .env before running docker compose}
ACCESS_TOKEN_TTL_HOURS: 168
CORS_ORIGINS: http://localhost:8080,http://127.0.0.1:8080
OPENROUTER_API_KEY: ${OPENROUTER_API_KEY:-}
OPENROUTER_MODEL: ${OPENROUTER_MODEL:-nvidia/nemotron-3-super-120b-a12b:free}
OPENROUTER_APP_URL: ${OPENROUTER_APP_URL:-https://github.com/Aashikhandelwal05/prepiq}
OPENROUTER_APP_NAME: ${OPENROUTER_APP_NAME:-PrepIQ}
OPENROUTER_TIMEOUT_SECONDS: ${OPENROUTER_TIMEOUT_SECONDS:-30}
ports:
- "8000:8000"
depends_on:
db:
condition: service_healthy
healthcheck:
test: ["CMD", "python", "-c", "from urllib.request import urlopen; urlopen('http://127.0.0.1:8000/api/health').read()"]
interval: 15s
timeout: 5s
retries: 5
frontend:
build:
context: .
dockerfile: Dockerfile.frontend
args:
VITE_API_BASE_URL: http://localhost:8000
ports:
- "8080:80"
depends_on:
backend:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "wget -q -O - http://127.0.0.1 >/dev/null 2>&1 || exit 1"]
interval: 15s
timeout: 5s
retries: 5
volumes:
postgres_data: