Allow customizing JDBC URLs at run-time instead of during container build (FINERACT-773)

In Docker, set JAVA_OPTS instead of FINERACT_TENANTS_URL.

Because ARG/ENV in the Dockerfile can't (easily) be changed at run-time.

At first I tried to override the ENTRYPOINT with a script which sets
JAVA_OPTS based on FINERACT_TENANTS_URL and then delegates to the original
/app-entrypoint.sh; that didn't immediately work, so this seems simpler.

Including make default tenant JDBC hostname & port configurable at Docker container run instead of build time.
This commit is contained in:
Michael Vorburger
2019-11-26 06:06:59 +01:00
parent 01518b0f32
commit edc9e030e1
7 changed files with 26 additions and 18 deletions
+4
View File
@@ -42,3 +42,7 @@ services:
- 8443:8443
depends_on:
- fineractmysql
environment:
- JAVA_OPTS=-Dfineract_tenants_url=jdbc:mysql:thin://fineractmysql:3306/mifosplatform-tenants -Djava.awt.headless=true -XX:+UseG1GC -Dfile.encoding=UTF-8
- FINERACT_DEFAULT_TENANTDB_HOSTNAME=fineractmysql
- FINERACT_DEFAULT_TENANTDB_PORT=3306