-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.prod-example.yml
175 lines (163 loc) · 3.99 KB
/
docker-compose.prod-example.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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
version: '3.7'
volumes:
postgres:
solr_data:
solr_backups:
networks:
solr:
db:
secrets:
master_key:
file: ./config/master.key
services:
solr1:
image: solr:9.0.0
container_name: solr1
ports:
- "8981:8983"
environment:
- ZK_HOST=zoo1:2181,zoo2:2181,zoo3:2181
volumes:
- solr_data:/var/solr
- solr_backups:/var/backups
networks:
- solr
depends_on:
- zoo1
- zoo2
- zoo3
solr2:
image: solr:9.0.0
container_name: solr2
ports:
- "8982:8983"
environment:
- ZK_HOST=zoo1:2181,zoo2:2181,zoo3:2181
volumes:
- solr_data:/var/solr
- solr_backups:/var/backups
networks:
- solr
depends_on:
- zoo1
- zoo2
- zoo3
solr3:
image: solr:9.0.0
container_name: solr3
ports:
- "8983:8983"
environment:
- ZK_HOST=zoo1:2181,zoo2:2181,zoo3:2181
volumes:
- solr_data:/var/solr
- solr_backups:/var/backups
networks:
- solr
depends_on:
- zoo1
- zoo2
- zoo3
zoo1:
image: zookeeper:3.6.2
container_name: zoo1
restart: always
hostname: zoo1
ports:
- 2181:2181
- 7001:7000
environment:
ZOO_MY_ID: 1
ZOO_SERVERS: server.1=zoo1:2888:3888;2181 server.2=zoo2:2888:3888;2181 server.3=zoo3:2888:3888;2181
ZOO_4LW_COMMANDS_WHITELIST: mntr, conf, ruok
ZOO_CFG_EXTRA: "metricsProvider.className=org.apache.zookeeper.metrics.prometheus.PrometheusMetricsProvider metricsProvider.httpPort=7000 metricsProvider.exportJvmInfo=true"
volumes:
- solr_backups:/var/backups
networks:
- solr
zoo2:
image: zookeeper:3.6.2
container_name: zoo2
restart: always
hostname: zoo2
ports:
- 2182:2181
- 7002:7000
environment:
ZOO_MY_ID: 2
ZOO_SERVERS: server.1=zoo1:2888:3888;2181 server.2=zoo2:2888:3888;2181 server.3=zoo3:2888:3888;2181
ZOO_4LW_COMMANDS_WHITELIST: mntr, conf, ruok
ZOO_CFG_EXTRA: "metricsProvider.className=org.apache.zookeeper.metrics.prometheus.PrometheusMetricsProvider metricsProvider.httpPort=7000 metricsProvider.exportJvmInfo=true"
volumes:
- solr_backups:/var/backups
networks:
- solr
zoo3:
image: zookeeper:3.6.2
container_name: zoo3
restart: always
hostname: zoo3
ports:
- 2183:2181
- 7003:7000
environment:
ZOO_MY_ID: 3
ZOO_SERVERS: server.1=zoo1:2888:3888;2181 server.2=zoo2:2888:3888;2181 server.3=zoo3:2888:3888;2181
ZOO_4LW_COMMANDS_WHITELIST: mntr, conf, ruok
ZOO_CFG_EXTRA: "metricsProvider.className=org.apache.zookeeper.metrics.prometheus.PrometheusMetricsProvider metricsProvider.httpPort=7000 metricsProvider.exportJvmInfo=true"
volumes:
- solr_backups:/var/backups
networks:
- solr
postgres:
image: "postgres:15.0-alpine"
restart: always
environment:
- POSTGRES_USER=rails
- POSTGRES_PASSWORD=400zzAFOQ2t2llyAJBt
- POSTGRES_DB=hxs_blacklight
ports:
- '5438:5432'
volumes:
- postgres:/var/lib/postgresql/data
networks:
- db
app:
build:
context: .
dockerfile: .docker/rails.prod.Dockerfile
args:
- RAILS_PORT=3000
secrets:
- master_key
environment:
- SOLR_URL=http://solr1:8983/solr/blacklight-core
- DATABASE_URL=postgres://rails:400zzAFOQ2t2llyAJBt@postgres:5432/hxs_blacklight
ports:
- "3000:3000"
command:
- "bundle exec rails server -p 3000 -b 0.0.0.0"
networks:
- solr
- db
depends_on:
- postgres
- solr1
- solr2
- solr3
worker:
build:
context: .
dockerfile: .docker/rails.prod.Dockerfile
args:
- RAILS_PORT=3000
secrets:
- master_key
environment:
- SOLR_URL=http://solr1:8983/solr/blacklight-core
- DATABASE_URL=postgres://rails:400zzAFOQ2t2llyAJBt@postgres:5432/hxs_blacklight
command:
- "cron -f"
networks:
- solr
- db