-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
52 lines (52 loc) · 1.07 KB
/
docker-compose.yml
File metadata and controls
52 lines (52 loc) · 1.07 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
version: '2.4'
volumes:
pgdataknowledge:
mongodata:
services:
app:
build:
context: .
target: dev
depends_on:
database:
condition: service_healthy
mongo:
condition: service_healthy
environment:
APP_URL: ${APP_URL}
APP_SECRET: ${APP_SECRET}
DB_HOST: ${DB_HOST}
DB_USER: ${DB_USER}
DB_PASS: ${DB_PASS}
DB_NAME: ${DB_NAME}
NODE_ENV: ${NODE_ENV}
ports:
- '3333:3333'
volumes:
- ./:/app
database:
image: postgres:12.3
restart: on-failure
healthcheck:
test: pg_isready -h 127.0.0.1
interval: 10s
timeout: 5s
retries: 5
environment:
POSTGRES_PASSWORD: ${DB_PASS}
ports:
- '5432:5432'
volumes:
- pgdataknowledge:/var/lib/postgresql/data
mongo:
image: mongo
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongo localhost:27017/test --quiet
interval: 10s
timeout: 5s
retries: 5
ports:
- '27017:27017'
restart: on-failure
volumes:
- mongodata:/data/db