-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
70 lines (67 loc) · 1.54 KB
/
docker-compose.dev.yml
File metadata and controls
70 lines (67 loc) · 1.54 KB
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
66
67
68
69
70
services:
client:
build:
context: ./client
dockerfile: Dockerfile.dev
container_name: mutabor_dev_client
ports:
- "8080:3000"
depends_on:
api:
condition: service_started
environment:
- CHOKIDAR_USEPOLLING=true
volumes:
- ./client:/app
- /app/node_modules
api:
build:
context: ./api
dockerfile: Dockerfile.dev
container_name: mutabor_dev_api
ports:
- "8081:3001"
depends_on:
db_dev:
condition: service_healthy
env_file:
- ./api/.env.dev
environment:
- PORT=3001
- NODE_ENV=development
- DB_HOST=db_dev
- DB_PORT=5432
- DB_USER=user
- DB_PASSWORD=password
- DB_NAME=mutabor_dev
- DATABASE_URL=postgresql://user:password@db_dev:5432/mutabor_dev?schema=public
- CHOKIDAR_USEPOLLING=true
volumes:
- ./api:/app
- /app/node_modules
- /app/dist
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:3001/health"]
interval: 15s
timeout: 5s
retries: 5
start_period: 45s
db_dev:
image: postgres:13
container_name: mutabor_dev_db
ports:
- "54322:5432"
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: mutabor_dev
volumes:
- postgres_dev_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U user -d mutabor_dev"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
volumes:
postgres_dev_data: