-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
45 lines (42 loc) · 1.1 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
45 lines (42 loc) · 1.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
44
45
services:
db:
image: postgres:16-alpine
environment:
POSTGRES_USER: openlearning
POSTGRES_PASSWORD: openlearning
POSTGRES_DB: openlearning
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
- ./docker/init-test-db.sh:/docker-entrypoint-initdb.d/init-test-db.sh
healthcheck:
test: ["CMD", "pg_isready", "-U", "openlearning"]
interval: 10s
timeout: 5s
retries: 5
backend:
build:
context: ./backend
target: base
volumes:
- ./backend:/app
command: ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]
environment:
DATABASE_URL: postgresql+asyncpg://openlearning:openlearning@db:5432/openlearning
depends_on:
db:
condition: service_healthy
frontend:
build:
context: ./frontend
target: deps
volumes:
- ./frontend:/app
- /app/node_modules
command: ["npm", "run", "dev"]
environment:
NEXT_PUBLIC_API_URL: http://localhost:8000
BACKEND_URL: http://backend:8000
volumes:
postgres-data: