-
Notifications
You must be signed in to change notification settings - Fork 32
/
docker-compose-db-and-proxy.yml
executable file
·115 lines (110 loc) · 3.52 KB
/
docker-compose-db-and-proxy.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
version: "3.8"
services:
mongo:
image: mongo:5.0.6
command: mongod --port ${MONGO_PORT}
container_name: cpr-mongo
restart: unless-stopped
volumes:
- ./db:/data/db
environment:
MONGO_INITDB_DATABASE: ${MONGO_INITDB_DATABASE}
MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD}
MONGO_PORT: ${MONGO_PORT}
MONGO2_PORT: ${MONGO2_PORT}
MONGO3_PORT: ${MONGO3_PORT}
MONGO4_PORT: ${MONGO4_PORT}
MONGO5_PORT: ${MONGO5_PORT}
MONGO_USERNAME: ${MONGO_USERNAME}
MONGO_PASSWORD: ${MONGO_PASSWORD}
ports:
- "127.0.0.1:${MONGO_PORT}:${MONGO_PORT}"
mongo2:
image: mongo:5.0.6
command: mongod --port ${MONGO2_PORT}
container_name: cpr-mongo2
restart: unless-stopped
volumes:
- ./db2:/data/db
environment:
MONGO_INITDB_DATABASE: ${MONGO_INITDB_DATABASE}
MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD}
MONGO_PORT: ${MONGO_PORT}
MONGO2_PORT: ${MONGO2_PORT}
MONGO3_PORT: ${MONGO3_PORT}
MONGO4_PORT: ${MONGO4_PORT}
MONGO5_PORT: ${MONGO5_PORT}
MONGO_USERNAME: ${MONGO_USERNAME}
MONGO_PASSWORD: ${MONGO_PASSWORD}
ports:
- "127.0.0.1:${MONGO2_PORT}:${MONGO2_PORT}"
mongo3:
image: mongo:5.0.6
command: mongod --port ${MONGO3_PORT}
container_name: cpr-mongo3
restart: unless-stopped
volumes:
- ./db3:/data/db
environment:
MONGO_INITDB_DATABASE: ${MONGO_INITDB_DATABASE}
MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD}
MONGO_PORT: ${MONGO_PORT}
MONGO2_PORT: ${MONGO2_PORT}
MONGO3_PORT: ${MONGO3_PORT}
MONGO4_PORT: ${MONGO4_PORT}
MONGO5_PORT: ${MONGO5_PORT}
MONGO_USERNAME: ${MONGO_USERNAME}
MONGO_PASSWORD: ${MONGO_PASSWORD}
ports:
- "127.0.0.1:${MONGO3_PORT}:${MONGO3_PORT}"
mongo4:
image: mongo:5.0.6
command: mongod --port ${MONGO4_PORT}
container_name: cpr-mongo4
restart: unless-stopped
volumes:
- ./db4:/data/db
environment:
MONGO_INITDB_DATABASE: ${MONGO_INITDB_DATABASE}
MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD}
MONGO_PORT: ${MONGO_PORT}
MONGO2_PORT: ${MONGO2_PORT}
MONGO3_PORT: ${MONGO3_PORT}
MONGO4_PORT: ${MONGO4_PORT}
MONGO5_PORT: ${MONGO5_PORT}
MONGO_USERNAME: ${MONGO_USERNAME}
MONGO_PASSWORD: ${MONGO_PASSWORD}
ports:
- "127.0.0.1:${MONGO4_PORT}:${MONGO4_PORT}"
mongo5:
image: mongo:5.0.6
command: mongod --port ${MONGO5_PORT}
container_name: cpr-mongo5
restart: unless-stopped
volumes:
- ./db5:/data/db
environment:
MONGO_INITDB_DATABASE: ${MONGO_INITDB_DATABASE}
MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD}
MONGO_PORT: ${MONGO_PORT}
MONGO2_PORT: ${MONGO2_PORT}
MONGO3_PORT: ${MONGO3_PORT}
MONGO4_PORT: ${MONGO4_PORT}
MONGO5_PORT: ${MONGO5_PORT}
MONGO_USERNAME: ${MONGO_USERNAME}
MONGO_PASSWORD: ${MONGO_PASSWORD}
ports:
- "127.0.0.1:${MONGO5_PORT}:${MONGO5_PORT}"
nginx:
image: nginx:1.21.6
restart: unless-stopped
container_name: cpr-nginx
volumes:
- ./nginxDBandProxy.conf:/etc/nginx/nginx.conf:rw
ports:
- "3000:80"