diff --git a/lxc-apps/cts/install.sh b/lxc-apps/cts/install.sh index f02d849..56ba078 100755 --- a/lxc-apps/cts/install.sh +++ b/lxc-apps/cts/install.sh @@ -28,11 +28,6 @@ export CTS_SECRET=$(head -c 26 /dev/urandom | base64 | tr -d '+/=') envsubst /srv/cts/cts_conf/spotter.py touch /srv/cts/cts_conf/__init__.py -# Set "production values" (increases performance) only if the DEBUG environment variable is not set -if [ ${DEBUG:-0} -eq 0 ]; then - sed -i 's/DEBUG = True/DEBUG = False/' /srv/cts/cts_conf/spotter.py -fi - # Populate database lxc-execute cts -- manage.py migrate diff --git a/lxc-apps/cts/install/cts_conf/spotter.py b/lxc-apps/cts/install/cts_conf/spotter.py index fe77949..b0ff6ca 100644 --- a/lxc-apps/cts/install/cts_conf/spotter.py +++ b/lxc-apps/cts/install/cts_conf/spotter.py @@ -43,5 +43,5 @@ CELERY_EAGER_PROPAGATES_EXCEPTIONS = True TIME_ZONE = 'Europe/Prague' LANGUAGE_CODE = 'cs' -DEBUG = True +DEBUG = False TEMPLATE_DEBUG = DEBUG diff --git a/lxc-apps/mifosx/install.sh b/lxc-apps/mifosx/install.sh index 949a95e..2a2a869 100755 --- a/lxc-apps/mifosx/install.sh +++ b/lxc-apps/mifosx/install.sh @@ -3,49 +3,49 @@ set -ev cd $(realpath $(dirname "${0}"))/install -# Check prerequisites -[ ! -e /run/openrc/started/mariadb ] && service mariadb start && STOP_MARIADB=1 +# 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 --skip-test-db # Create databases export MIFOSX_PWD=$(head -c 18 /dev/urandom | base64 | tr -d '+/=') -envsubst /srv/mifosx/conf/context.xml -cp srv/mifosx/conf/server.xml /srv/mifosx/conf/server.xml - -# Install service -cp etc/init.d/mifosx /etc/init.d/mifosx -rc-update -u +mkdir -p /srv/mifosx_conf +envsubst /srv/mifosx/mifosx_conf/context.xml +cp mifosx_conf/server.xml /srv/mifosx/mifosx_conf/server.xml # Populate database ->/var/log/lxc/mifosx.log -lxc-start mifosx +service start mifosx until grep -q 'org.apache.catalina.startup.Catalina.start Server startup' /var/log/lxc/mifosx.log; do sleep 1 done -lxc-stop mifosx +service stop mifosx # 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 mifosx-mariadb -- mysql mifostenant-default # Update admin account export MIFOSX_ADMIN_USER=admin export MIFOSX_ADMIN_EMAIL=admin@example.com export MIFOSX_ADMIN_PWD=$(head -c 12 /dev/urandom | base64 | tr -d '+/=') export MIFOSX_ADMIN_HASH=$(echo -n "${MIFOSX_ADMIN_PWD}{1}" | sha256sum | awk '{print $1}') -envsubst