-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
33 lines (33 loc) · 841 Bytes
/
docker-compose.yml
File metadata and controls
33 lines (33 loc) · 841 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
33
version: '3'
services:
mongo:
image: mongo:4.2.9
container_name: mongo
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=admin
- MONGO_DB=test
- MONGO_DB_USER=test
- MONGO_DB_PASS=test
ports:
- "27017:27017"
volumes:
- ./mongo-volume:/data/db
- ./init-mongo.sh:/docker-entrypoint-initdb.d/init-mongo.sh
poetrydb:
build: .
container_name: poetrydb
environment:
- MONGODB_URI=mongodb://mongo:27017/test
- MONGODB_USER=test
- MONGODB_PASS=test
command: bash -c "ruby /poetrydb/tools/db_populate.rb /poetrydb/tools/test.json &&
bundle exec unicorn -p 3000 -c unicorn.rb"
volumes:
- ./:/poetrydb
ports:
- "3000:3000"
links:
- mongo
depends_on:
- mongo