-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
46 lines (42 loc) · 1.25 KB
/
docker-compose.yml
File metadata and controls
46 lines (42 loc) · 1.25 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
version: '3.8'
services:
db:
image: postgres:latest
environment:
POSTGRES_DB: ${POSTGRES_DB:-codecrew}
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-codecrew123}
ports:
- "${DB_PORT:-5432}:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d codecrew"]
interval: 5s
timeout: 5s
retries: 5
backend:
build: ./backend
ports:
- "${BACKEND_PORT:-8000}:8000"
environment:
- DATABASE_URL=${DATABASE_URL:-postgresql://postgres:codecrew123@db:5432/codecrew}
- SECRET_KEY=${SECRET_KEY:-09d25e094faa6ca2556c818166b7a9563b93f7099f6f0f4caa6cf63b88e8d3e7}
- OPENAI_API_KEY=${OPENAI_API_KEY}
- ACCESS_TOKEN_EXPIRE_MINUTES=${ACCESS_TOKEN_EXPIRE_MINUTES:-60}
- DEBUG=${DEBUG:-false}
- CORS_ORIGINS=${CORS_ORIGINS:-http://localhost:5173,http://localhost:3000}
depends_on:
db:
condition: service_healthy
restart: unless-stopped
frontend:
build: ./frontend
ports:
- "${FRONTEND_PORT:-5173}:5173"
environment:
- VITE_API_URL=${VITE_API_URL:-http://localhost:8000}
depends_on:
- backend
volumes:
postgres_data: