forked from IQSS/dataverse
-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose-dev.yml
241 lines (228 loc) · 7.53 KB
/
docker-compose-dev.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
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
version: "2.4"
services:
dev_dataverse:
container_name: "dev_dataverse"
hostname: dataverse
image: ${APP_IMAGE}
restart: on-failure
user: payara
environment:
DATAVERSE_DB_HOST: postgres
DATAVERSE_DB_PASSWORD: secret
DATAVERSE_DB_USER: ${DATAVERSE_DB_USER}
ENABLE_JDWP: "1"
ENABLE_RELOAD: "1"
SKIP_DEPLOY: "${SKIP_DEPLOY}"
DATAVERSE_JSF_REFRESH_PERIOD: "1"
DATAVERSE_FEATURE_API_BEARER_AUTH: "1"
DATAVERSE_MAIL_SYSTEM_EMAIL: "dataverse@localhost"
DATAVERSE_MAIL_MTA_HOST: "smtp"
DATAVERSE_AUTH_OIDC_ENABLED: "1"
DATAVERSE_AUTH_OIDC_CLIENT_ID: test
DATAVERSE_AUTH_OIDC_CLIENT_SECRET: 94XHrfNRwXsjqTqApRrwWmhDLDHpIYV8
DATAVERSE_AUTH_OIDC_AUTH_SERVER_URL: http://keycloak.mydomain.com:8090/realms/test
DATAVERSE_SPI_EXPORTERS_DIRECTORY: "/dv/exporters"
# These two oai settings are here to get HarvestingServerIT to pass
dataverse_oai_server_maxidentifiers: "2"
dataverse_oai_server_maxrecords: "2"
JVM_ARGS: -Ddataverse.files.storage-driver-id=file1
-Ddataverse.files.file1.type=file
-Ddataverse.files.file1.label=Filesystem
-Ddataverse.files.file1.directory=${STORAGE_DIR}/store
-Ddataverse.files.localstack1.type=s3
-Ddataverse.files.localstack1.label=LocalStack
-Ddataverse.files.localstack1.custom-endpoint-url=http://localstack:4566
-Ddataverse.files.localstack1.custom-endpoint-region=us-east-2
-Ddataverse.files.localstack1.bucket-name=mybucket
-Ddataverse.files.localstack1.path-style-access=true
-Ddataverse.files.localstack1.upload-redirect=true
-Ddataverse.files.localstack1.download-redirect=true
-Ddataverse.files.localstack1.access-key=default
-Ddataverse.files.localstack1.secret-key=default
-Ddataverse.files.minio1.type=s3
-Ddataverse.files.minio1.label=MinIO
-Ddataverse.files.minio1.custom-endpoint-url=http://minio:9000
-Ddataverse.files.minio1.custom-endpoint-region=us-east-1
-Ddataverse.files.minio1.bucket-name=mybucket
-Ddataverse.files.minio1.path-style-access=true
-Ddataverse.files.minio1.upload-redirect=false
-Ddataverse.files.minio1.download-redirect=false
-Ddataverse.files.minio1.access-key=4cc355_k3y
-Ddataverse.files.minio1.secret-key=s3cr3t_4cc355_k3y
-Ddataverse.pid.providers=fake
-Ddataverse.pid.default-provider=fake
-Ddataverse.pid.fake.type=FAKE
-Ddataverse.pid.fake.label=FakeDOIProvider
-Ddataverse.pid.fake.authority=10.5072
-Ddataverse.pid.fake.shoulder=FK2/
ports:
- "8080:8080" # HTTP (Dataverse Application)
- "4949:4848" # HTTPS (Payara Admin Console)
- "9009:9009" # JDWP
- "8686:8686" # JMX
networks:
- dataverse
depends_on:
- dev_postgres
- dev_solr
- dev_dv_initializer
volumes:
- ./docker-dev-volumes/app/data:/dv
- ./docker-dev-volumes/app/secrets:/secrets
- ./target/dataverse:/opt/payara/deployments/dataverse:ro
tmpfs:
- /dumps:mode=770,size=2052M,uid=1000,gid=1000
- /tmp:mode=770,size=2052M,uid=1000,gid=1000
mem_limit: 2147483648 # 2 GiB
mem_reservation: 1024m
privileged: false
dev_bootstrap:
container_name: "dev_bootstrap"
image: gdcc/configbaker:unstable
restart: "no"
command:
- bootstrap.sh
- dev
networks:
- dataverse
dev_dv_initializer:
container_name: "dev_dv_initializer"
image: gdcc/configbaker:unstable
restart: "no"
command:
- sh
- -c
- "fix-fs-perms.sh dv"
volumes:
- ./docker-dev-volumes/app/data:/dv
dev_postgres:
container_name: "dev_postgres"
hostname: postgres
image: postgres:${POSTGRES_VERSION}
restart: on-failure
environment:
- POSTGRES_USER=${DATAVERSE_DB_USER}
- POSTGRES_PASSWORD=secret
ports:
- "5432:5432"
networks:
- dataverse
volumes:
- ./docker-dev-volumes/postgresql/data:/var/lib/postgresql/data
dev_solr_initializer:
container_name: "dev_solr_initializer"
image: gdcc/configbaker:unstable
restart: "no"
command:
- sh
- -c
- "fix-fs-perms.sh solr && cp -a /template/* /solr-template"
volumes:
- ./docker-dev-volumes/solr/data:/var/solr
- ./docker-dev-volumes/solr/conf:/solr-template
dev_solr:
container_name: "dev_solr"
hostname: "solr"
image: solr:${SOLR_VERSION}
depends_on:
- dev_solr_initializer
restart: on-failure
ports:
- "8983:8983"
networks:
- dataverse
command:
- "solr-precreate"
- "collection1"
- "/template"
volumes:
- ./docker-dev-volumes/solr/data:/var/solr
- ./docker-dev-volumes/solr/conf:/template
dev_smtp:
container_name: "dev_smtp"
hostname: "smtp"
image: maildev/maildev:2.0.5
restart: on-failure
ports:
- "25:25" # smtp server
- "1080:1080" # web ui
environment:
- MAILDEV_SMTP_PORT=25
- MAILDEV_MAIL_DIRECTORY=/mail
networks:
- dataverse
#volumes:
# - ./docker-dev-volumes/smtp/data:/mail
tmpfs:
- /mail:mode=770,size=128M,uid=1000,gid=1000
dev_keycloak:
container_name: "dev_keycloak"
image: 'quay.io/keycloak/keycloak:21.0'
hostname: keycloak
environment:
- KEYCLOAK_ADMIN=kcadmin
- KEYCLOAK_ADMIN_PASSWORD=kcpassword
- KEYCLOAK_LOGLEVEL=DEBUG
- KC_HOSTNAME_STRICT=false
networks:
dataverse:
aliases:
- keycloak.mydomain.com #create a DNS alias within the network (add the same alias to your /etc/hosts to get a working OIDC flow)
command: start-dev --import-realm --http-port=8090 # change port to 8090, so within the network and external the same port is used
ports:
- "8090:8090"
volumes:
- './conf/keycloak/test-realm.json:/opt/keycloak/data/import/test-realm.json'
# This proxy configuration is only intended to be used for development purposes!
# DO NOT USE IN PRODUCTION! HIGH SECURITY RISK!
dev_proxy:
image: caddy:2-alpine
# The command below is enough to enable using the admin gui, but it will not rewrite location headers to HTTP.
# To achieve rewriting from https:// to http://, we need a simple configuration file
#command: ["caddy", "reverse-proxy", "-f", ":4848", "-t", "https://dataverse:4848", "--insecure"]
command: ["caddy", "run", "-c", "/Caddyfile"]
ports:
- "4848:4848" # Will expose Payara Admin Console (HTTPS) as HTTP
restart: always
volumes:
- ./conf/proxy/Caddyfile:/Caddyfile:ro
depends_on:
- dev_dataverse
networks:
- dataverse
dev_localstack:
container_name: "dev_localstack"
hostname: "localstack"
image: localstack/localstack:2.3.2
restart: on-failure
ports:
- "127.0.0.1:4566:4566"
environment:
- DEBUG=${DEBUG-}
- DOCKER_HOST=unix:///var/run/docker.sock
- HOSTNAME_EXTERNAL=localstack
networks:
- dataverse
volumes:
- ./conf/localstack:/etc/localstack/init/ready.d
tmpfs:
- /localstack:mode=770,size=128M,uid=1000,gid=1000
dev_minio:
container_name: "dev_minio"
hostname: "minio"
image: minio/minio
restart: on-failure
ports:
- "9000:9000"
- "9001:9001"
networks:
- dataverse
volumes:
- ./docker-dev-volumes/minio_storage:/data
environment:
MINIO_ROOT_USER: 4cc355_k3y
MINIO_ROOT_PASSWORD: s3cr3t_4cc355_k3y
command: server /data
networks:
dataverse:
driver: bridge