-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-dev.yml
51 lines (48 loc) · 1.17 KB
/
docker-compose-dev.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
services:
backend:
build:
context: ./backend
dockerfile: Dockerfile.dev
container_name: drive-quest-dev-backend
ports:
- "5000:5000"
volumes:
- ./backend/src:/app/src
restart: unless-stopped
environment:
- DATABASE_URL=postgres://root:password@database:5432/drive_quest
depends_on:
database:
condition: service_healthy
healthcheck:
test: [ "CMD-SHELL", "curl -f http://localhost:5000/health || exit 1"]
interval: 5s
timeout: 20s
retries: 50
frontend:
build:
context: ./frontend
dockerfile: Dockerfile.dev
container_name: drive-quest-dev-frontend
volumes:
- ./frontend/src:/app/src
ports:
- "5173:5173"
restart: unless-stopped
database:
image: postgres:16
container_name: drive-quest-dev-database
restart: unless-stopped
environment:
- POSTGRES_USER=root
- POSTGRES_PASSWORD=password
- POSTGRES_DB=drive_quest
volumes:
- database:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -d postgres"]
interval: 5s
timeout: 20s
retries: 50
volumes:
database: