-
Notifications
You must be signed in to change notification settings - Fork 45
/
docker-compose.yml
224 lines (215 loc) · 7 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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
version: '3.7'
# Settings and configurations that are common for all containers
services:
reverse-proxy:
# The official v2 Traefik docker image
image: traefik:v2.2
# Enables the web UI and tells Traefik to listen to docker
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- --providers.docker.network=traefik
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--entrypoints.web.http.redirections.entryPoint.to=websecure"
- "--entrypoints.web.http.redirections.entryPoint.scheme=https"
- "--entrypoints.web.http.redirections.entryPoint.priority=10" # disable permanent forwarding for every route
- "--certificatesresolvers.myresolver.acme.tlschallenge=true" # <== Enable TLS-ALPN-01 to generate and renew ACME certs
- "--certificatesresolvers.myresolver.acme.email=${useremail}"
- "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
- "--certificatesresolvers.myresolver.acme.httpchallenge.entrypoint=web"
ports:
# The HTTP port
- "80:80"
# The HTTPS port
- "443:443"
# The Web UI (enabled by --api.insecure=true)
- "8089:8080"
volumes:
# So that Traefik can listen to the Docker events
- /var/run/docker.sock:/var/run/docker.sock
# volume to store letsencrypt certificates
- "./letsencrypt:/letsencrypt"
networks:
- traefik
postgres:
networks:
- traefik
container_name: postgres
ports:
- "5433:5432"
image: postgres:10.13
restart: unless-stopped
environment:
- "LC_ALL=C.UTF-8"
- "POSTGRES_DB"
- "POSTGRES_USER"
- "POSTGRES_PASSWORD"
- "POSTGRES_PORT"
volumes:
- ${LOCAL_STORAGE}/database-data:/var/lib/postgresql/data/ # persist data even if container shuts down
- ./triggers:/triggers
solr:
networks:
- traefik
image: coronawhy/solr:8.9.0
container_name: solr
privileged: true
ports:
- "8983:8983"
environment:
- "SOLR_HOST=solr"
- "SOLR_PORT=8983"
- "SOLR_JAVA_MEM=-Xms1g -Xmx1g"
- "SOLR_OPTS=-Dlog4j2.formatMsgNoLookups=true"
volumes:
- solr-data:/opt/solr/server/solr/collection1/data
- ./config/schema.xml:/var/solr/data/collection1/conf/schema.xml
labels:
- "traefik.enable=true"
- "traefik.http.routers.solr.rule=Host(`solr.${traefikhost}`)"
- "traefik.http.services.solr.loadbalancer.server.port=8983"
- "traefik.http.routers.solr.tls=true"
- "traefik.http.routers.solr.tls.certresolver=myresolver"
minio:
# Please use fixed versions :D
image: minio/minio:RELEASE.2021-10-06T23-36-31Z
networks:
- traefik
volumes:
- ./minio-data:/data
command:
- server
- /data
- --console-address
- ":9001"
environment:
- MINIO_ROOT_USER=love
- MINIO_ROOT_PASSWORD=love1234
# Do NOT use MINIO_DOMAIN or MINIO_SERVER_URL with Traefik.
# All Routing is done by Traefik, just tell minio where to redirect to.
- MINIO_BROWSER_REDIRECT_URL=http://stash.localhost
deploy:
labels:
- traefik.enable=true
- traefik.http.routers.minio.service=minio
- traefik.http.routers.minio.rule=Host(`minio.${traefikhost}`)
- traefik.http.services.minio.loadbalancer.server.port=9000
- traefik.http.routers.minio-console.service=minio-console
- traefik.http.routers.minio-console.rule=Host(`minio-stash.${traefikhost}`)
- traefik.http.services.minio-console.loadbalancer.server.port=9001
whoami:
networks:
- traefik
image: "containous/whoami"
container_name: "whoami"
labels:
- "traefik.enable=true"
# - "traefik.http.routers.whoami.entrypoints=web"
- "traefik.http.routers.whoami.rule=Host(`whoami.${traefikhost}`)"
- "traefik.http.routers.whoami.tls=true"
- "traefik.http.routers.whoami.tls.certresolver=myresolver"
dataverse:
networks:
- traefik
image: ${DOCKER_HUB}:${VERSION}
container_name: dataverse
privileged: true
user:
"root"
ports:
#- "443:443"
- "4848:4848"
- "8080:8080"
environment:
- "CVM_SERVER_NAME=CESSDA" #Optional
- "WEBHOOK"
- "CESSDA"
- "CLARIN"
- "doi_authority"
- "doi_provider"
- "doi_username"
- "doi_password"
- "dataciterestapiurlstring"
- "baseurlstring"
- "aws_bucket_name"
- "aws_s3_profile"
- "aws_endpoint_url"
- "system_email"
- "mailhost"
- "mailuser"
- "no_reply_email"
- "smtp_password"
- "smtp_port"
- "socket_port"
- "federated_json_file"
- "bucketname_1"
- "minio_label_1"
- "minio_bucket_1"
- "bucketname_2"
- "minio_profile_1"
- "minio_label_2"
- "minio_bucket_2"
- "minio_profile_2"
- "DATAVERSE_DB_HOST"
- "DATAVERSE_DB_USER"
- "DATAVERSE_DB_PASSWORD"
- "DATAVERSE_DB_NAME"
- "DATAVERSE_SERVICE_HOST"
- "DATAVERSE_URL"
- "SOLR_SERVICE_HOST"
- "SOLR_SERVICE_PORT"
- "CVM_SERVER_URL=https://ns.${traefikhost}"
- "LANG=en"
- "cvManager=http://"
- "BUNDLEPROPERTIES=Bundle.properties"
- "ADMIN_EMAIL=admin@localhost"
- "MAIL_SERVER=mailrelay"
- "SOLR_LOCATION=solr:8983"
- "INIT_SCRIPTS_FOLDER"
- "hostname"
- "MAINLANG"
- "POSTGRES_SERVER"
- "POSTGRES_PORT"
- "POSTGRES_DATABASE"
- "POSTGRES_USER"
- "POSTGRES_PASSWORD"
- "PGPASSWORD"
- "TWORAVENS_LOCATION=NOT INSTALLED"
- "RSERVE_HOST=localhost"
- "RSERVE_PORT=6311"
- "RSERVE_USER=rserve"
- "RSERVE_PASSWORD=rserve"
- "JVM_OPTS='-Xmx1g -Xms1g -XX:MaxPermSize=2g -XX:PermSize=2g'"
depends_on:
- postgres
- solr
volumes:
- ${CONFIGURATION_PATH}/secrets:/secrets
- ${LOCAL_STORAGE}/data:/data
- ${DOCROOT}/docroot:/opt/docroot
- ./init.d:/opt/payara/init.d
- ./triggers:/opt/payara/triggers
- ./config/schema.xml:/opt/payara/dvinstall/schema.xml
labels:
- "traefik.enable=true"
- "traefik.http.routers.dataverse.rule=Host(`www.${traefikhost}`)"
- "traefik.http.services.dataverse.loadbalancer.server.port=8080"
- "traefik.http.routers.dataverse.tls=true"
- "traefik.http.routers.dataverse.tls.certresolver=myresolver"
volumes:
database-data:
solr-data:
dataverse-data:
data1-1:
data1-2:
data2-1:
data2-2:
data3-1:
data3-2:
data4-1:
data4-2:
networks:
traefik:
external: true