From a763665f32fb197d88a8cb6636bd8aae8ff5fe18 Mon Sep 17 00:00:00 2001 From: Disassembler Date: Thu, 22 Oct 2020 22:57:45 +0200 Subject: [PATCH] Bump MifosX to Alpine 3.12 --- lxc-apps/mifosx/app | 6 +++--- lxc-apps/mifosx/image | 17 +++++++++-------- lxc-apps/mifosx/install/update-conf.sh | 11 +++++++++++ 3 files changed, 23 insertions(+), 11 deletions(-) diff --git a/lxc-apps/mifosx/app b/lxc-apps/mifosx/app index 93cd268..e09fb2d 100644 --- a/lxc-apps/mifosx/app +++ b/lxc-apps/mifosx/app @@ -1,5 +1,5 @@ { - "version": "18.03.01-200621", + "version": "18.03.01-201021", "meta": { "title": "Mifos X", "desc-cs": "Mikrofinancování rozvojových projektů", @@ -8,7 +8,7 @@ }, "containers": { "mifosx": { - "image": "mifosx_18.03.01-200621", + "image": "mifosx_18.03.01-201021", "depends": [ "mifosx-mariadb" ], @@ -18,7 +18,7 @@ } }, "mifosx-mariadb": { - "image": "mariadb_10.4.13-200621", + "image": "mariadb_10.4.15-201021", "mounts": { "mifosx/mariadb_conf/my.cnf": "etc/my.cnf:file", "mifosx/mariadb_data": "var/lib/mysql" diff --git a/lxc-apps/mifosx/image b/lxc-apps/mifosx/image index a69cf9f..c01df99 100644 --- a/lxc-apps/mifosx/image +++ b/lxc-apps/mifosx/image @@ -1,9 +1,10 @@ -IMAGE mifosx_18.03.01-200621 -FROM alpine3.11-tomcat8.5_8.5.56-200621 +IMAGE mifosx_18.03.01-201021 +FROM alpine3.12-tomcat8.5_8.5.59-201021 RUN EOF - # Install full-featured wget to work around sourceforge bugs - apk --no-cache add wget + # Install build dependencies + # Full-featured wget needed to work around sourceforge bugs + apk --no-cache add --virtual .deps patch wget # Download Mifos X wget https://sourceforge.net/projects/mifos/files/Mifos%20X/mifosplatform-18.03.01.RELEASE.zip/download -O /tmp/mifosx.zip @@ -15,10 +16,6 @@ RUN EOF # Download Java library dependencies wget https://repo.maven.apache.org/maven2/org/drizzle/jdbc/drizzle-jdbc/1.4/drizzle-jdbc-1.4.jar -O /srv/tomcat/lib/drizzle-jdbc-1.4.jar - - # Cleanup - apk --no-cache del wget - rm -rf /tmp/fineractplatform-18.03.01.RELEASE /tmp/mifosx.zip EOF # s6 required for single service due to hanging threads @@ -33,6 +30,10 @@ RUN EOF # Change webapps ownership chown -R tomcat:tomcat /srv/tomcat/webapps + + # Cleanup + apk --no-cache del .deps + rm -rf /tmp/fineractplatform-18.03.01.RELEASE /tmp/mifosx.zip EOF CMD /bin/s6-svscan /etc/services.d diff --git a/lxc-apps/mifosx/install/update-conf.sh b/lxc-apps/mifosx/install/update-conf.sh index 7ce781b..7bca2fa 100755 --- a/lxc-apps/mifosx/install/update-conf.sh +++ b/lxc-apps/mifosx/install/update-conf.sh @@ -3,9 +3,20 @@ # Volumes MIFOSX_CONF="${VOLUMES_DIR}/mifosx/mifosx_conf" +# Start MariaDB container if needed +if [ "$(spoc-container status mifosx-mariadb)" != "RUNNING" ]; then + STOP_MARIADB=1 + spoc-container start mifosx-mariadb +fi + # Replacements sed -i "s|\(^\s\+proxyName=\).*|\1\"${HOST}\"|" ${MIFOSX_CONF}/server.xml sed -i "s|\(^\s\+proxyPort=\).*|\1\"${PORT}\"|" ${MIFOSX_CONF}/server.xml QUERY="UPDATE \`c_external_service_properties\` SET \`value\` = '${EMAIL}' WHERE \`external_service_id\` = 2 and \`name\` LIKE 'username'" spoc-container exec mifosx-mariadb -- mysql -e "${QUERY}" mifostenant-default + +# Stop MariaDB container if needed +if [ -n "${STOP_MARIADB}" ]; then + echo spoc-container stop mifosx-mariadb +fi