-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
158 lines (147 loc) · 3.55 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
version: '3.8'
name: sessions
services:
service:
build:
context: .
args:
NODE_ENV: 'development'
container_name: service
hostname: service
ports:
- 3000:3000
volumes:
- ./src/:/app/src/
- .env/:/app/.env
restart: always
networks:
- app-network
redis:
image: redis:latest
container_name: redis
hostname: redis
restart: always
ports:
- '6379:6379'
volumes:
- redis_data:/data
networks:
- app-network
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
interval: 10s
timeout: 30s
retries: 5
redis-bullboard:
image: deadly0/bull-board:latest
container_name: redis-bullboard
hostname: redis-bullboard
restart: always
ports:
- 3010:3000
networks:
- app-network
environment:
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_DB=0
- USER_LOGIN=admin
- USER_PASSWORD=admin123
depends_on:
- redis
redis-commander:
image: ghcr.io/joeferner/redis-commander:latest
container_name: redis-commander
hostname: redis-commander
restart: always
ports:
- 3011:8081
networks:
- app-network
environment:
- REDIS_HOSTS=local:redis:6379
depends_on:
- redis
mongo-express:
image: mongo-express:latest
container_name: mongo-express
hostname: mongo-express
environment:
ME_CONFIG_BASICAUTH_USERNAME: admin
ME_CONFIG_BASICAUTH_PASSWORD: admin123
ME_CONFIG_MONGODB_URL: mongodb://host.docker.internal:27017,host.docker.internal:27018,host.docker.internal:27019/ack?retryWrites=true&w=majority&replicaSet=rs0
ports:
- 3012:8081
networks:
- app-network
depends_on:
- mongodb1
- mongodb2
- mongodb3
mongodb1:
container_name: mongodb1
hostname: mongodb1
image: mongo:latest
restart: always
ports:
- "27017:27017"
links:
- mongodb2
- mongodb3
depends_on:
mongodb2:
condition: service_started
mongodb3:
condition: service_started
networks:
- app-network
volumes:
- mongodb1_data:/data/db
- mongodb1_config:/data/configdb
command: mongod --bind_ip_all --replSet rs0 --port 27017
extra_hosts:
- "host.docker.internal:host-gateway"
healthcheck:
test: echo "try { rs.status() } catch (err) { rs.initiate({_id:'rs0',members:[{_id:0,host:'host.docker.internal:27017',priority:1},{_id:1,host:'host.docker.internal:27018',priority:0.5},{_id:2,host:'host.docker.internal:27019',priority:0.5}]}) }" | mongosh --port 27017 --quiet
interval: 5s
timeout: 30s
start_period: 0s
start_interval: 1s
retries: 5
mongodb2:
container_name: mongodb2
hostname: mongodb2
image: mongo:latest
networks:
- app-network
restart: always
ports:
- "27018:27018"
volumes:
- mongodb2_data:/data/db
- mongodb2_config:/data/configdb
command: mongod --bind_ip_all --replSet rs0 --port 27018
mongodb3:
container_name: mongodb3
hostname: mongodb3
image: mongo:latest
networks:
- app-network
restart: always
ports:
- "27019:27019"
volumes:
- mongodb3_data:/data/db
- mongodb3_config:/data/configdb
command: mongod --bind_ip_all --replSet rs0 --port 27019
volumes:
mongodb1_data:
mongodb2_data:
mongodb3_data:
mongodb1_config:
mongodb2_config:
mongodb3_config:
redis_data:
networks:
app-network:
driver: bridge