-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.debug.yaml
58 lines (54 loc) · 1.17 KB
/
compose.debug.yaml
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
services:
backend-dev:
image: backend-dev
build:
context: backend/
target: debug
command:
- "sh"
- "-c"
- |
alembic upgrade head \
&& python ./src/db/init_db.py \
&& python -m debugpy --wait-for-client --listen 0.0.0.0:5678 \
-m uvicorn src.main:app --reload --host 0.0.0.0
ports:
- 5678:5678
- 8000:8000
volumes:
- ./backend/src/:/app/src/
- ./backend/alembic/:/app/alembic/
env_file:
- .env
depends_on:
- postgres-dev
# same as in compose.yaml but with ports
frontend-dev:
image: frontend-dev
build:
context: frontend/
target: development
volumes:
- ./frontend/src/:/app/src/
ports:
- 5173:5173
env_file:
- .env
tty: true # for color logs
# same as in compose.yaml but with ports
postgres-dev:
image: postgres:16-alpine
restart: unless-stopped
volumes:
- postgres-data:/var/lib/postgresql/data/
ports:
- 5432:5432
env_file:
- .env
healthcheck:
test: [ "CMD", "pg_isready" ]
interval: 10s
timeout: 5s
retries: 5
volumes:
postgres-data: