Make MifosX installation a bit less error-prone
This commit is contained in:
parent
bbf8219504
commit
b4f5979354
@ -24,13 +24,14 @@ cp etc/init.d/mifosx /etc/init.d/mifosx
|
||||
rc-update -u
|
||||
|
||||
# Populate database
|
||||
>/var/log/lxc/mifosx.log
|
||||
service mifosx start
|
||||
until grep -q 'Migrating schema `mifostenant-default` to version 5000' /var/log/lxc/mifosx.log; do
|
||||
until grep -q 'org.apache.catalina.startup.Catalina.start Server startup' /var/log/lxc/mifosx.log; do
|
||||
sleep 1
|
||||
done
|
||||
service mifosx stop
|
||||
# Fix missing previous_run_status column
|
||||
echo 'ALTER TABLE `scheduled_email_campaign` ADD `previous_run_status` VARCHAR(10) NULL;' | lxc-attach mariadb -- mysql mifostenant-default
|
||||
#echo 'ALTER TABLE `scheduled_email_campaign` ADD `previous_run_status` VARCHAR(10) NULL;' | lxc-attach mariadb -- mysql mifostenant-default
|
||||
|
||||
# Update admin account
|
||||
export MIFOSX_ADMIN_USER=admin
|
||||
|
@ -1 +1 @@
|
||||
UPDATE tenants SET timezone_id = "Europe/Prague", schema_server = "mariadb", schema_username = "mifosx", schema_password = "${MIFOSX_PWD}" WHERE identifier = "default";
|
||||
UPDATE `tenants` SET `timezone_id` = "Europe/Prague", `schema_server` = "mariadb", `schema_username` = "mifosx", `schema_password` = "${MIFOSX_PWD}" WHERE `identifier` = "default";
|
||||
|
@ -4,14 +4,12 @@ LAYER shared/java
|
||||
LAYER shared/tomcat
|
||||
LAYER mifosx/mifosx
|
||||
|
||||
COPY lxc
|
||||
|
||||
RUN EOF
|
||||
# Install full-featured wget to work around sourceforge bugs
|
||||
apk --no-cache add wget
|
||||
|
||||
# Download Mifos X
|
||||
wget https://sourceforge.net/projects/mifos/files/latest/download -O /tmp/mifosx.zip
|
||||
wget https://sourceforge.net/projects/mifos/files/Mifos%20X/mifosplatform-18.03.01.RELEASE.zip/download -O /tmp/mifosx.zip
|
||||
mkdir /srv/tomcat/webapps/fineract-provider
|
||||
unzip /tmp/mifosx.zip -d /tmp
|
||||
unzip /tmp/fineractplatform-18.03.01.RELEASE/fineract-provider.war -d /srv/tomcat/webapps/fineract-provider
|
||||
@ -29,19 +27,19 @@ RUN EOF
|
||||
# Cleanup
|
||||
apk --no-cache del wget
|
||||
rm -rf /tmp/fineractplatform-18.03.01.RELEASE /tmp/mifosx.zip
|
||||
|
||||
# Update Czech translation of community-app
|
||||
wget 'https://translatewiki.net/wiki/Special:ExportTranslations?group=out-mifos&language=cs&format=export-to-file' -O /srv/tomcat/webapps/ROOT/global-translations/locale-cs.json
|
||||
cd /srv/tomcat/webapps/ROOT/scripts/
|
||||
|
||||
# Apply translation patch
|
||||
patch -p0 </tmp/locale-cs.patch
|
||||
rm /tmp/locale-cs.patch
|
||||
EOF
|
||||
|
||||
# s6 required for single service due to hanging threads
|
||||
COPY lxc
|
||||
|
||||
RUN EOF
|
||||
# Update Czech translation of community-app
|
||||
wget 'https://translatewiki.net/wiki/Special:ExportTranslations?group=out-mifos&language=cs&format=export-to-file' -O /srv/tomcat/webapps/ROOT/global-translations/locale-cs.json
|
||||
cd /srv/tomcat/webapps/ROOT/scripts/
|
||||
patch -p0 </tmp/locale-cs.patch
|
||||
rm /tmp/locale-cs.patch
|
||||
EOF
|
||||
|
||||
MOUNT FILE /srv/mifosx/conf/server.xml srv/tomcat/conf/server.xml
|
||||
MOUNT FILE /srv/mifosx/conf/context.xml srv/tomcat/webapps/fineract-provider/META-INF/context.xml
|
||||
|
||||
|
@ -25,7 +25,7 @@ rc-update -u
|
||||
|
||||
# Populate database
|
||||
service opendatakit start
|
||||
until grep -q 'org.apache.catalina.startup.Catalina.start' /var/log/lxc/opendatakit.log; do
|
||||
until grep -q 'org.apache.catalina.startup.Catalina.start Server startup' /var/log/lxc/opendatakit.log; do
|
||||
sleep 1
|
||||
done
|
||||
service opendatakit stop
|
||||
|
Loading…
Reference in New Issue
Block a user