-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
53 lines (49 loc) · 1.08 KB
/
docker-compose.yml
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
version: "3"
services:
postgres:
image: "postgres:13.3-alpine"
ports:
- 15432:5432
volumes:
- postgres_data:/var/lib/postgresql/data
env_file:
- .env
restart:
on-failure
healthcheck:
test: ["CMD-SHELL", "pg_isready -d $POSTGRES_DB -U $POSTGRES_USER"]
interval: 10s
timeout: 5s
retries: 5
backend:
image: backend-gastrofit
build:
context: ./
dockerfile: Dockerfile
env_file:
- .env
network_mode: "host"
command: wait-for-it $POSTGRES_HOST:$POSTGRES_PORT -- bash -c "python manage.py migrate && python manage.py runserver"
expose:
- "8000"
volumes:
- ./:/app
depends_on:
postgres:
condition: service_healthy
frontend:
build:
context: ./frontend
image: frontend-gastrofit
hostname: frontend-gastrofit
command: npm run dev
network_mode: "host"
expose:
- "5173"
env_file:
- .env
volumes:
- /frontend/node_modules
- ./frontend:/frontend
volumes:
postgres_data: