-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
44 lines (44 loc) · 927 Bytes
/
docker-compose.yml
File metadata and controls
44 lines (44 loc) · 927 Bytes
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:
web:
build:
context: .
dockerfile: Dockerfile.dev
ports:
- 3000:3000
environment:
POSTGRES_USER: postgres
POSTGRES_HOST: db
BINDING: 0.0.0.0
tty: true
stdin_open: true
volumes:
- .:/src/app
- node_modules:/src/app/node_modules
depends_on:
- db
links:
- db:db
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000"]
interval: 1m30s
timeout: 10s
retries: 3
start_period: 40s
db:
image: postgres:16
environment:
POSTGRES_USER: postgres
POSTGRES_HOST_AUTH_METHOD: trust
volumes:
- db_data:/var/lib/postgresql/data
ports:
- 5432:5432
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -h localhost"]
interval: 30s
timeout: 10s
retries: 5
start_period: 20s
volumes:
db_data:
node_modules: