-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathdocker-compose.yml
44 lines (42 loc) · 1.09 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: '3.1'
services:
mongodb:
container_name: embulk-input-mongodb_server
image: mongo:3.6
restart: always
ports:
- 27017:27017
- 27018:27018
environment:
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: tiger
volumes:
- mongodb-data:/data/db
- mongodb-configdb:/data/configdb
mongo-express:
container_name: mongo-express
image: mongo-express
restart: always
ports:
- 8081:8081
depends_on:
- mongodb
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: admin
ME_CONFIG_MONGODB_ADMINPASSWORD: tiger
ME_CONFIG_MONGODB_SERVER: mongodb
mongoClientTemp:
container_name: mongoClientTemp
image: mongo:3.6
depends_on:
- mongodb
# Sleep to wait MongoDB wake up on Travis CI
command: >
/bin/bash -c
"sleep 15 &&
mongo --host mongodb -u admin -p tiger admin --eval \"db.getSiblingDB('mydb').createUser({user:'mongo_user', pwd:'dbpass', roles:[{role:'readWrite',db:'mydb'}]});\""
volumes:
mongodb-data:
driver: local
mongodb-configdb:
driver: local