-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
80 lines (77 loc) · 2.4 KB
/
Copy pathdocker-compose.yml
File metadata and controls
80 lines (77 loc) · 2.4 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
services:
# -----------------------------
# DATABASE
# -----------------------------
db:
image: docker.io/library/postgres:17-alpine
container_name: sira_db
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
POSTGRES_DB: ${POSTGRES_DB:-sira}
ports:
- "5432:5432"
volumes:
- db_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
# -----------------------------
# BACKEND (FastAPI + uv)
# -----------------------------
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: sira_backend
restart: unless-stopped
env_file: .env
environment:
# Override DB URL for Docker network (uses service name 'db' instead of localhost)
- DATABASE_URL=postgresql+psycopg2://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:5432/${POSTGRES_DB:-sira}
# Disable SSL verification for Pinecone (development mode)
- PINECONE_SKIP_SSL=true
- GRPC_CLIENT_CHANNEL_TARGET_SSL_CERT_VERIFY=false
ports:
- "8000:8000"
volumes:
- ./backend:/app # Hot reload
- uploads_data:/app/uploads # Persistent file storage
depends_on:
db:
condition: service_healthy
# Command to run in dev mode
command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
# -----------------------------
# FRONTEND (Next.js 16 + Bun)
# -----------------------------
frontend:
build:
context: .
dockerfile: ./frontend/Dockerfile
# 1. Pass non-secret public vars as ARGs
args:
- NEXT_PUBLIC_API_BASE_URL=${NEXT_PUBLIC_API_BASE_URL}
container_name: sira_frontend
restart: unless-stopped
env_file: .env
ports:
- "3000:3000"
environment:
- WATCHPACK_POLLING=true
- NEXT_PUBLIC_API_BASE_URL=${NEXT_PUBLIC_API_BASE_URL}
# Runtime secrets (Next.js needs them at runtime too)
- NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=${NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY}
- CLERK_SECRET_KEY=${CLERK_SECRET_KEY}
volumes:
- ./frontend:/app
- /app/node_modules
- /app/.next
depends_on:
- backend
volumes:
db_data:
uploads_data: