Bump MifosX to Alpine 3.12

This commit is contained in:
Disassembler 2020-10-22 22:57:45 +02:00
parent 2b09ee23c8
commit a763665f32
Signed by: Disassembler
GPG Key ID: 524BD33A0EE29499
3 changed files with 23 additions and 11 deletions

View File

@ -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"

View File

@ -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

View File

@ -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