-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yaml
44 lines (41 loc) · 941 Bytes
/
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
services:
db:
image: postgres
container_name: db
restart: always
ports:
- '5433:5432'
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_USER=${POSTGRES_USER}
- PGUSER=postgres
volumes:
- data:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready"]
timeout: 30s
retries: 5
backend:
build: ./backend
container_name: web_backend
restart: always
ports:
- '8004:8000'
command: bash -c "python manage.py makemigrations && python manage.py migrate && python manage.py runserver 0.0.0.0:8000"
env_file:
- .env
depends_on:
db:
condition: service_healthy
frontend:
build: ./frontend
container_name: web_frontend
restart: always
ports:
- '5175:5173'
command: npm run dev
depends_on:
- 'backend'
volumes:
data: