-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
44 lines (41 loc) · 1.03 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
version: '2.1'
volumes:
express_sample_db_dev: {}
express_sample_node_modules: {}
services:
db:
image: postgres:9.6.1
volumes:
- express_sample_db_dev:/var/lib/postgresql/data
environment:
- POSTGRES_DB=sampledb
- POSTGRES_USER=sampleuser
- POSTGRES_PASSWORD=samplesecret
- POSTGRES_INITDB_ARGS=--encoding=UTF-8
healthcheck:
test: "pg_isready -h localhost -p 5432 -U postgres"
interval: 3s
timeout: 1s
retries: 10
express:
build:
context: .
dockerfile: ./compose/express/Dockerfile-dev
command: /start-dev.sh
ports:
- "3000:3000"
volumes:
- ./src:/app/src
- ./package.json:/app/package.json
- express_sample_node_modules:/app/node_modules
environment:
- EXPRESS_DB_HOST=postgres
- EXPRESS_DB_PORT=5432
- EXPRESS_DB_NAME=sampledb
- EXPRESS_DB_USER=sampleuser
- EXPRESS_DB_PASSWORD=samplesecret
depends_on:
db:
condition: service_healthy
links:
- db:postgres