-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
43 lines (43 loc) · 1 KB
/
docker-compose.yml
File metadata and controls
43 lines (43 loc) · 1 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
services:
db:
image: postgres:15
restart: unless-stopped
environment:
POSTGRES_DB: cheatsheet_db
POSTGRES_USER: cheatsheet_user
POSTGRES_PASSWORD: cheatsheet_pass
# ports: comment out for now we'e not using atm
# - "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
backend:
build: ./backend
ports:
- "8000:8000"
env_file:
- ./backend/.env.docker
environment:
- DATABASE_URL=postgres://cheatsheet_user:cheatsheet_pass@db:5432/cheatsheet_db
volumes:
- ./backend:/app
depends_on:
- db
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/api/health/"]
interval: 10s
timeout: 5s
retries: 10
frontend:
build: ./frontend
ports:
- "5173:5173"
environment:
- VITE_API_URL=http://backend:8000
volumes:
- ./frontend:/app
- /app/node_modules
depends_on:
backend:
condition: service_healthy
volumes:
postgres_data: