You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by vo...@apache.org on 2020/04/17 23:47:13 UTC

[fineract] 02/02: add MySQL JDBC Driver (LGPL) to Dockerfile + doc (fixes FINERACT-762)

This is an automated email from the ASF dual-hosted git repository.

vorburger pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git

commit 1c74398d900cd8ec11166681684832519cc4b314
Author: Michael Vorburger <mi...@vorburger.ch>
AuthorDate: Mon Apr 13 18:44:53 2020 +0200

    add MySQL JDBC Driver (LGPL) to Dockerfile + doc (fixes FINERACT-762)
    
    Note that it is NOT enabled by default, which should be OK for the ASF.
    
    The main point here is just to clearly document it for end-users.
    
    I've obviously tried out what's documented, and can confirm it works.
---
 Dockerfile         | 11 +++++++++--
 docker-compose.yml |  6 ++++++
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index 14de81c..27f4e68 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -51,6 +51,13 @@ COPY ./docker/server.xml /opt/bitnami/tomcat/conf
 RUN chmod 664 /opt/bitnami/tomcat/conf/server.xml
 
 WORKDIR /opt/bitnami/tomcat/lib
-# org.drizzle.jdbc.DrizzleDriver is used in docker/server.xml for jdbc/fineract_tenants DataSource
-# (But note that connections to individual tenant DBs may use another driver...)
+# org.drizzle.jdbc.DrizzleDriver is used by default for both the all tenants and demo tenant DB DataSource
 RUN wget https://repo1.maven.org/maven2/org/drizzle/jdbc/drizzle-jdbc/1.4/drizzle-jdbc-1.4.jar
+
+# https://issues.apache.org/jira/browse/LEGAL-462
+# https://issues.apache.org/jira/browse/FINERACT-762
+# We include an alternative JDBC driver (which is faster, but not allowed to be default in Apache distribution)
+# allowing implementations to switch the driver used by changing start-up parameters (for both tenants and each tenant DB)
+# The commented out lines in the docker-compose.yml illustrate how to do this.
+# To be sure that this instead of Drizlle is used, comment out wget above.
+RUN wget https://repo1.maven.org/maven2/mysql/mysql-connector-java/8.0.19/mysql-connector-java-8.0.19.jar
diff --git a/docker-compose.yml b/docker-compose.yml
index 9ad6911..80e1116 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -55,3 +55,9 @@ services:
       - FINERACT_DEFAULT_TENANTDB_PORT=3306
       - FINERACT_DEFAULT_TENANTDB_UID=root
       - FINERACT_DEFAULT_TENANTDB_PWD=skdcnwauicn2ucnaecasdsajdnizucawencascdca
+
+# https://issues.apache.org/jira/browse/FINERACT-762
+# To use an altnerative JDBC driver (which is faster, but not allowed to be default in Apache distribution)
+# replace org.drizzle.jdbc.DrizzleDriver with com.mysql.jdbc.Driver in DRIVERCLASS_NAME and fineract_tenants_driver,
+# and remove ":thin:" from PROTOCOL and fineract_tenants_url.  Note that the mysql-connector-java-*.jar is already
+# bundled in the container by the Dockerfile, but just not used by default.