-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
74 lines (67 loc) · 1.83 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
version: '3'
services:
ws-node-book-bin-dev:
restart: always
build:
context: ./.
dockerfile: ./Dockerfile.dev
image: local-ws-node-book-bin-dev:latest
command: ['npm', 'run', 'start:dev']
container_name: ws-node-book-bin-container
environment:
- loglevel=none
links:
- mongodb-primary
- redis
working_dir: "/usr/src/app"
volumes:
- "./.:/usr/src/app"
- "/usr/src/app/node_modules"
ports:
- "8080:8080"
- "5858:5858"
mongodb-primary:
image: 'bitnami/mongodb:4.0'
container_name: mongodb-primary
environment:
- MONGODB_REPLICA_SET_MODE=primary
- MONGODB_ADVERTISED_HOSTNAME=mongodb-primary
- MONGODB_REPLICA_SET_NAME=bookBinRS
volumes:
- "../mongodb_master_data:/bitnami:rw"
ports:
- "27017:27017"
mongodb-secondary:
image: 'bitnami/mongodb:4.0'
container_name: mongodb-secondary
depends_on:
- mongodb-primary
environment:
- MONGODB_REPLICA_SET_MODE=secondary
- MONGODB_PRIMARY_HOST=mongodb-primary
- MONGODB_PRIMARY_PORT_NUMBER=27017
- MONGODB_ADVERTISED_HOSTNAME=mongodb-secondary
- MONGODB_REPLICA_SET_NAME=bookBinRS
mongodb-arbiter:
image: 'bitnami/mongodb:4.0'
container_name: mongodb-arbiter
depends_on:
- mongodb-primary
environment:
- MONGODB_REPLICA_SET_MODE=arbiter
- MONGODB_PRIMARY_HOST=mongodb-primary
- MONGODB_PRIMARY_PORT_NUMBER=27017
- MONGODB_ADVERTISED_HOSTNAME=mongodb-arbiter
- MONGODB_REPLICA_SET_NAME=bookBinRS
redis:
container_name: tokenholder
image: 'bitnami/redis:5.0'
environment:
- ALLOW_EMPTY_PASSWORD=yes
ports:
- '6379:6379'
volumes:
- ../db-data/redis-data:/bitnami/redis/data
volumes:
mongodb_master_data:
driver: local