-
Notifications
You must be signed in to change notification settings - Fork 15
/
docker-compose.yml
36 lines (36 loc) · 907 Bytes
/
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
version: "2.1"
services:
app:
build: ./app
image: ageapps/docker-chat:app
volumes:
- ./app:/app # volume in host
- /app/node_modules # volume node_modules from container
depends_on:
db:
condition: service_healthy
environment:
- DEBUG=docker-chat:*
- MONGO_USERNAME=node
- MONGO_PASSWORD=node
- MONGO_DATABASE=nodedb
ports:
- 8888:3000
command: [nodemon, ./bin/www]
db:
build: ./mongo
image: ageapps/docker-chat:mongo
volumes:
- ./database:/data # volume in host -> $(pwd)/database
environment:
- MONGO_DB_APP_PASSWORD=node
- MONGO_DB_APP_USERNAME=node
- MONGO_DB_APP_DATABASE=nodedb
ports:
- "27017:27017"
healthcheck:
test: ["CMD", "echo", "show dbs", "|", "mongo"]
interval: 30s
timeout: 10s
retries: 3
command: mongod --smallfiles