-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
50 lines (50 loc) · 1.1 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
version: '2.1'
services:
diamond:
extends:
file: config.yml
service: diamond
build:
context: ./
dockerfile: Dockerfile.dev
image: myriade/diamond:dev
command: ["bash", "-c", "npm install && npm run migration:up && npm run start:dev"]
environment:
- NODE_ENV=local
volumes:
- ./:/usr/src/app:rw
- /usr/src/app/node_modules
ports:
- "8081:8081"
- "9873:9873"
depends_on:
db:
condition: service_healthy
cache:
condition: service_healthy
db:
image: postgres:9.6
environment:
- POSTGRES_PASSWORD=postgres
- POSTGRES_USER=postgres
- POSTGRES_DB=bucky
ports:
- "5432:5432"
volumes:
- db_data:/var/lib/postgres/data
healthcheck:
test: "pg_isready -h localhost -p 5432 -q -U postgres"
interval: 1s
timeout: 1s
retries: 100
cache:
image: redis:3.2.3
ports:
- "6379:6379"
healthcheck:
test: "redis-cli -h localhost ping | grep -q 'PONG'"
interval: 1s
timeout: 1s
retries: 60
volumes:
db_data: