-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
56 lines (53 loc) · 1.67 KB
/
docker-compose.yml
File metadata and controls
56 lines (53 loc) · 1.67 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
# Development only — DO NOT use in production. See docker-compose.production.yml
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_DB: cryptoserve
POSTGRES_USER: cryptoserve
POSTGRES_PASSWORD: localdev
ports:
- "5433:5432" # Use 5433 to avoid conflicts with local PostgreSQL
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U cryptoserve"]
interval: 5s
timeout: 5s
retries: 5
backend:
build: ./backend
ports:
- "8003:8003"
environment:
DATABASE_URL: postgresql+asyncpg://cryptoserve:localdev@postgres:5432/cryptoserve
GITHUB_CLIENT_ID: ${GITHUB_CLIENT_ID}
GITHUB_CLIENT_SECRET: ${GITHUB_CLIENT_SECRET}
CRYPTOSERVE_MASTER_KEY: ${CRYPTOSERVE_MASTER_KEY:-650c3daddd7c6efee7f5cdb3a4645a497b6132643d93f3c007d7e99a87155993}
JWT_SECRET_KEY: ${JWT_SECRET_KEY:-a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2}
FRONTEND_URL: http://localhost:3003
BACKEND_URL: http://localhost:8003
DEV_MODE: "true"
STARTUP_VALIDATION_LEVEL: skip
depends_on:
postgres:
condition: service_healthy
volumes:
- ./backend:/app
command: uvicorn app.main:app --host 0.0.0.0 --port 8003 --reload
frontend:
build: ./frontend
ports:
- "3003:3000"
environment:
NEXT_PUBLIC_API_URL: http://localhost:8003
# Server-side API URL for Next.js rewrites (container-to-container)
API_URL: http://backend:8003
depends_on:
- backend
volumes:
- ./frontend:/app
- /app/node_modules
- /app/.next
volumes:
postgres_data: