-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yaml
65 lines (60 loc) · 1.25 KB
/
compose.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
59
60
61
62
63
64
65
services:
nginx-dev:
image: nginx:stable-alpine
volumes:
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf:ro
ports:
- 80:80
depends_on:
- backend-dev
- frontend-dev
backend-dev:
image: backend-dev
build:
context: backend/
target: development
command:
- "sh"
- "-c"
- |
alembic upgrade head \
&& python ./src/db/init_db.py \
&& uvicorn src.main:app --reload --host 0.0.0.0
volumes:
- ./backend/src/:/app/src/
- ./backend/alembic/:/app/alembic/
# ports:
# - 8000:8000
env_file:
- .env
depends_on:
postgres-dev:
condition: service_healthy
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
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: