diff --git a/lxc-apps/mifosx/app b/lxc-apps/mifosx/app new file mode 100644 index 0000000..f253c37 --- /dev/null +++ b/lxc-apps/mifosx/app @@ -0,0 +1,28 @@ +{ + "version": "18.03.01-200313", + "meta": { + "title": "Mifos X", + "desc-cs": "Mikrofinancování rozvojových projektů", + "desc-en": "Development projects microfinancing", + "license": "GPL" + }, + "containers": { + "mifosx": { + "image": "mifosx_18.03.01-200313", + "depends": [ + "mifosx-mariadb" + ], + "mounts": { + "mifosx/mifosx_conf/server.xml": "srv/tomcat/conf/server.xml:file", + "mifosx/mifosx_conf/context.xml": "srv/tomcat/webapps/fineract-provider/META-INF/context.xml:file" + } + }, + "mifosx-mariadb": { + "image": "mariadb_10.4.12-200313", + "mounts": { + "mifosx/mariadb_conf/my.cnf": "etc/my.cnf:file", + "mifosx/mariadb_data": "var/lib/mysql" + } + } + } +} diff --git a/lxc-apps/mifosx/lxcfile b/lxc-apps/mifosx/image similarity index 94% rename from lxc-apps/mifosx/lxcfile rename to lxc-apps/mifosx/image index 0224086..8792c93 100644 --- a/lxc-apps/mifosx/lxcfile +++ b/lxc-apps/mifosx/image @@ -1,5 +1,5 @@ -IMAGE mifosx_18.03.01-190620 -FROM alpine3.9-tomcat8.5_8.5.41-190620 +IMAGE mifosx_18.03.01-200313 +FROM alpine3.11-tomcat8.5_8.5.51-200313 RUN EOF # Install full-featured wget to work around sourceforge bugs @@ -22,7 +22,7 @@ RUN EOF EOF # s6 required for single service due to hanging threads -COPY lxc +COPY image.d RUN EOF # Update Czech translation of community-app diff --git a/lxc-apps/mifosx/lxc/etc/services.d/.s6-svscan/finish b/lxc-apps/mifosx/image.d/etc/services.d/.s6-svscan/finish similarity index 100% rename from lxc-apps/mifosx/lxc/etc/services.d/.s6-svscan/finish rename to lxc-apps/mifosx/image.d/etc/services.d/.s6-svscan/finish diff --git a/lxc-apps/mifosx/lxc/etc/services.d/tomcat/run b/lxc-apps/mifosx/image.d/etc/services.d/tomcat/run similarity index 100% rename from lxc-apps/mifosx/lxc/etc/services.d/tomcat/run rename to lxc-apps/mifosx/image.d/etc/services.d/tomcat/run diff --git a/lxc-apps/mifosx/lxc/tmp/locale-cs.patch b/lxc-apps/mifosx/image.d/tmp/locale-cs.patch similarity index 100% rename from lxc-apps/mifosx/lxc/tmp/locale-cs.patch rename to lxc-apps/mifosx/image.d/tmp/locale-cs.patch diff --git a/lxc-apps/mifosx/install.sh b/lxc-apps/mifosx/install.sh index e9a8d1f..7e54422 100755 --- a/lxc-apps/mifosx/install.sh +++ b/lxc-apps/mifosx/install.sh @@ -1,50 +1,50 @@ #!/bin/sh set -ev +# Volumes +MARIADB_CONF="${VOLUMES_DIR}/mifosx/mariadb_conf" +MARIADB_DATA="${VOLUMES_DIR}/mifosx/mariadb_data" +MIFOSX_CONF="${VOLUMES_DIR}/mifosx/mifosx_conf" + # Create MariaDB instance -mkdir -p /srv/mifosx/mariadb_conf /srv/mifosx/mariadb_data -chown 103306:103306 /srv/mifosx/mariadb_data -cp mariadb_conf/my.cnf /srv/mifosx/mariadb_conf/my.cnf -chown -R 100000:100000 /srv/mifosx/mariadb_conf -lxc-execute mifosx-mariadb -- mysql_install_db --user=mysql --datadir=/var/lib/mysql --auth-root-authentication-method=socket --auth-root-socket-user=mysql --skip-test-db +install -o 100000 -g 100000 -m 755 -d ${MARIADB_CONF} +install -o 103306 -g 103306 -m 750 -d ${MARIADB_DATA} +install -o 100000 -g 100000 -m 644 mariadb_conf/my.cnf ${MARIADB_CONF}/my.cnf +spoc-container exec mifosx-mariadb -- mysql_install_db --user=mysql --datadir=/var/lib/mysql --auth-root-authentication-method=socket --auth-root-socket-user=mysql --skip-test-db # Create databases export MIFOSX_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=') -service lxc-mifosx-mariadb start -envsubst /srv/mifosx/mifosx_conf/context.xml -cp mifosx_conf/server.xml /srv/mifosx/mifosx_conf/server.xml -chown -R 100000:100000 /srv/mifosx/mifosx_conf +install -o 100000 -g 100000 -m 755 -d ${MIFOSX_CONF} +envsubst