-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
33 lines (29 loc) · 886 Bytes
/
docker-compose.yaml
File metadata and controls
33 lines (29 loc) · 886 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
version: '2'
services:
app:
build: .
ports:
- "3000:3000"
depends_on:
- mongo
environment:
- PORT=3000
- MONGO_URL=mongodb://mongo:27017/meteor
- MONGO_OPLOG_URL=mongodb://mongo:27017/local
- ROOT_URL=http://localhost:3000
mongo:
image: mongo:3.2
restart: unless-stopped
volumes:
- ./data/db:/data/db
#- ./data/dump:/dump
command: mongod --smallfiles --oplogSize 128 --replSet rs0 --storageEngine=mmapv1
labels:
- "traefik.enable=false"
# this container's job is just run the command to initialize the replica set.
# it will run the command and remove himself (it will not stay running)
mongo-init-replica:
image: mongo:3.2
command: 'mongo mongo/meteor --eval "rs.initiate({ _id: ''rs0'', members: [ { _id: 0, host: ''localhost:27017'' } ]})"'
depends_on:
- mongo