Skip to content

Commit 84d3b9a

Browse files
committed
env variables
1 parent 38e23ea commit 84d3b9a

File tree

2 files changed

+21
-15
lines changed

2 files changed

+21
-15
lines changed

app/utils/WkConf.scala

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ class WkConf @Inject()(configuration: Configuration, certificateValidationServic
1919
// Applying feature overwrites to the configuration.
2020
Configuration(
2121
ConfigFactory
22-
.parseMap(featureOverrides.map { case (k, v) => s"features.$k" -> v }.asJava)
22+
.parseMap(featureOverrides.map {
23+
case (k, v) => s"features.$k" -> Boolean.box(v && configuration.underlying.getBoolean(s"features.$k"))
24+
}.asJava)
2325
.withFallback(configuration.underlying))
2426
}
2527

docker-compose.yml

+18-14
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,10 @@ services:
4040
volumes:
4141
- ./binaryData:/webknossos/binaryData
4242
environment:
43-
POSTGRES_URL: jdbc:postgresql://postgres/webknossos
44-
POSTGRES_USER: webknossos_user
45-
POSTGRES_PASSWORD: secret_password
43+
- CERTIFICATE
44+
- POSTGRES_URL=jdbc:postgresql://postgres/webknossos
45+
- POSTGRES_USER=webknossos_user
46+
- POSTGRES_PASSWORD=secret_password
4647
user: ${USER_UID:-1000}:${USER_GID:-1000}
4748

4849
webknossos-datastore:
@@ -100,6 +101,8 @@ services:
100101
- USER_UID
101102
- USER_GID
102103
- COVERALLS_REPO_TOKEN
104+
- CERTIFICATE
105+
- CERTIFICATE_PUBLIC_KEY
103106
- TZ=${TZ:-Europe/Berlin}
104107
- POSTGRES_URL=jdbc:postgresql://postgres/webknossos
105108
- POSTGRES_USER=webknossos_user
@@ -142,9 +145,9 @@ services:
142145
fossildb-dev:
143146
condition: service_healthy
144147
environment:
145-
POSTGRES_URL: jdbc:postgresql://postgres/webknossos
146-
POSTGRES_USER: webknossos_user
147-
POSTGRES_PASSWORD: secret_password
148+
- POSTGRES_URL=jdbc:postgresql://postgres/webknossos
149+
- POSTGRES_USER=webknossos_user
150+
- POSTGRES_PASSWORD=secret_password
148151
command:
149152
- bash
150153
- -c
@@ -186,9 +189,10 @@ services:
186189
fossildb:
187190
condition: service_healthy
188191
environment:
189-
POSTGRES_URL: jdbc:postgresql://postgres/webknossos_testing
190-
POSTGRES_USER: webknossos_user
191-
POSTGRES_PASSWORD: secret_password
192+
- CERTIFICATE
193+
- POSTGRES_URL=jdbc:postgresql://postgres/webknossos
194+
- POSTGRES_USER=webknossos_user
195+
- POSTGRES_PASSWORD=secret_password
192196
command:
193197
- bash
194198
- -c
@@ -218,9 +222,9 @@ services:
218222
postgres:
219223
image: postgres:10-alpine
220224
environment:
221-
POSTGRES_DB: webknossos
222-
POSTGRES_USER: webknossos_user
223-
POSTGRES_PASSWORD: secret_password
225+
- POSTGRES_DB=webknossos
226+
- POSTGRES_USER=webknossos_user
227+
- POSTGRES_PASSWORD=secret_password
224228
healthcheck:
225229
test: ["CMD-SHELL", "pg_isready -d webknossos -U webknossos_user -h 127.0.0.1 -p 5432"]
226230
interval: 2s
@@ -252,7 +256,7 @@ services:
252256
postgres-persisted:
253257
condition: service_healthy
254258
environment:
255-
PGPASSWORD: secret_password
259+
- PGPASSWORD=secret_password
256260
volumes:
257261
- ./conf/evolutions/:/evolutions/
258262

@@ -265,7 +269,7 @@ services:
265269
postgres-dev:
266270
condition: service_healthy
267271
environment:
268-
PGPASSWORD: secret_password
272+
- PGPASSWORD=secret_password
269273

270274
# FossilDB
271275
fossildb:

0 commit comments

Comments
 (0)