-
Notifications
You must be signed in to change notification settings - Fork 17
/
docker-compose-mongo.yml
58 lines (55 loc) · 1.57 KB
/
docker-compose-mongo.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
version: "3.9"
services:
mongo:
build:
context: './'
dockerfile: mongo.Dockerfile
restart: always
environment:
- MONGO_INITDB_ROOT_USERNAME=${MONGODB_USER}
- MONGO_INITDB_ROOT_PASSWORD=${MONGODB_PASS}
- MONGO_INITDB_DATABASE=jury
- MONGO_REPLICA_SET_NAME=rs0
ports:
- 127.0.0.1:27107:27017
volumes:
- './data:/data/db'
- ./init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js
networks:
- jury-network
mongorssetup:
depends_on:
- 'mongo'
image: mongo:latest
environment:
- MONGODB_USER=${MONGODB_USER}
- MONGODB_PASS=${MONGODB_PASS}
volumes:
- .:/scripts
restart: "no"
entrypoint: [ 'bash', '/scripts/init-mongo-rs.sh' ]
networks:
- jury-dev-network
rust:
depends_on:
- 'mongo'
- 'mongorssetup'
container_name: jury-main
environment:
- MONGODB_URI=mongodb://${MONGODB_USER}:${MONGODB_PASS}@mongo:27017/
- JURY_ADMIN_PASSWORD=${JURY_ADMIN_PASSWORD}
- PORT=8000
build:
context: './'
dockerfile: Dockerfile
args:
- REACT_APP_JURY_NAME=${JURY_NAME}
- REACT_APP_JURY_URL=/api
- REACT_APP_HUB=${HEHE:-}
ports:
- 8000:8000
networks:
- jury-network
networks:
jury-network:
driver: bridge