-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
118 lines (113 loc) · 2.89 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
version: '2'
services:
mongo:
network_mode: 'bridge'
build: .
logging:
options:
max-size: "500k"
depends_on:
- mongo-01
- mongo-02
- mongo-03
environment:
- AWS_DEFAULT_REGION=eu-west-1
- AWS_S3_BUCKET_NAME=turistforeningen
- AWS_S3_BUCKET_PATH=/backups/mongo/
- 'MONGO_RS_MEMBERS=mongo-01.db.dnt.local:27100,mongo-02.db.dnt.local:27200'
- 'MONGO_RS_ARBITERS=mongo-03.db.dnt.local:27300'
extra_hosts:
- "mongo-01.db.dnt.local:${DOCKER_IP}"
- "mongo-02.db.dnt.local:${DOCKER_IP}"
- "mongo-03.db.dnt.local:${DOCKER_IP}"
volumes:
- .:/app
- ./dump:/dump
- ./secrets:/secrets
- ./data:/data
mongo-01:
image: mongo:3
expose:
- "27017"
network_mode: 'bridge'
logging:
options:
max-size: "500k"
ports:
- "27100:27017"
- "28017"
volumes:
- ./data/db-01:/data/db
environment:
- VIRTUAL_HOST=mongo-01.db.dnt.local
- VIRTUAL_PORT=28017
extra_hosts:
- "mongo-01.db.dnt.local:${DOCKER_IP}"
- "mongo-02.db.dnt.local:${DOCKER_IP}"
- "mongo-03.db.dnt.local:${DOCKER_IP}"
command: --noauth --httpinterface --replSet "rs0" --bind_ip 0.0.0.0
mongo-02:
network_mode: 'bridge'
image: mongo:3
ports:
- "27200:27017"
- "28017"
expose:
- "27017"
logging:
options:
max-size: "500k"
volumes:
- ./data/db-02:/data/db
environment:
- VIRTUAL_HOST=mongo-02.db.dnt.local
- VIRTUAL_PORT=28017
extra_hosts:
- "mongo-01.db.dnt.local:${DOCKER_IP}"
- "mongo-02.db.dnt.local:${DOCKER_IP}"
- "mongo-03.db.dnt.local:${DOCKER_IP}"
command: --noauth --httpinterface --replSet "rs0" --bind_ip 0.0.0.0
mongo-03:
image: mongo:3
network_mode: 'bridge'
ports:
- "27300:27017"
- "28017"
expose:
- "27017"
logging:
options:
max-size: "500k"
volumes:
- ./data/db-03:/data/db
environment:
- VIRTUAL_HOST=mongo-03.db.dnt.local
- VIRTUAL_PORT=28017
extra_hosts:
- "mongo-01.db.dnt.local:${DOCKER_IP}"
- "mongo-02.db.dnt.local:${DOCKER_IP}"
- "mongo-03.db.dnt.local:${DOCKER_IP}"
command: --noauth --httpinterface --replSet "rs0" --bind_ip 0.0.0.0
nosqlclient:
image: turistforeningen/nosqlclient:latest
depends_on:
- mongo
links:
- mongo
network_mode: 'bridge'
ports:
- "3000"
environment:
- VIRTUAL_HOST=nosqlclient.app.dnt.local
- VIRTUAL_PORT=3000
- MONGO_URL=mongodb://mongo:27017
# - MONGOCLIENT_AUTH=true
# - MONGOCLIENT_USERNAME=admin
# - MONGOCLIENT_PASSWORD=admin
extra_hosts:
- "mongo-01.db.dnt.local:${DOCKER_IP}"
- "mongo-02.db.dnt.local:${DOCKER_IP}"
- "mongo-03.db.dnt.local:${DOCKER_IP}"
logging:
options:
max-size: "500k"