From 0455738fa8d55c9bcb97ddc07883dbc6030d8fd3 Mon Sep 17 00:00:00 2001 From: Disassembler Date: Tue, 17 Mar 2020 10:53:26 +0100 Subject: [PATCH] Make FrontlineSMS SPOC-compatible --- lxc-apps/frontlinesms/{meta => app} | 10 +++++----- lxc-apps/frontlinesms/{lxcfile => image} | 6 +++--- .../frontlinesms/{lxc => image.d}/etc/X11/dummy.conf | 0 .../{lxc => image.d}/etc/services.d/.s6-svscan/finish | 0 .../{lxc => image.d}/etc/services.d/frontlinesms/run | 0 .../{lxc => image.d}/etc/services.d/xorg/run | 0 .../WEB-INF/grails-app/i18n/messages_cs.properties | 0 .../assets/i18n/frontlinesms-core_messages_cs.js | 0 lxc-apps/frontlinesms/install.sh | 8 +++++--- lxc-apps/frontlinesms/uninstall.sh | 2 +- 10 files changed, 14 insertions(+), 12 deletions(-) rename lxc-apps/frontlinesms/{meta => app} (51%) rename lxc-apps/frontlinesms/{lxcfile => image} (93%) rename lxc-apps/frontlinesms/{lxc => image.d}/etc/X11/dummy.conf (100%) rename lxc-apps/frontlinesms/{lxc => image.d}/etc/services.d/.s6-svscan/finish (100%) rename lxc-apps/frontlinesms/{lxc => image.d}/etc/services.d/frontlinesms/run (100%) rename lxc-apps/frontlinesms/{lxc => image.d}/etc/services.d/xorg/run (100%) rename lxc-apps/frontlinesms/{lxc => image.d}/srv/frontlinesms/frontlinesms2/web-app/WEB-INF/grails-app/i18n/messages_cs.properties (100%) rename lxc-apps/frontlinesms/{lxc => image.d}/srv/frontlinesms/frontlinesms2/web-app/assets/i18n/frontlinesms-core_messages_cs.js (100%) diff --git a/lxc-apps/frontlinesms/meta b/lxc-apps/frontlinesms/app similarity index 51% rename from lxc-apps/frontlinesms/meta rename to lxc-apps/frontlinesms/app index 450600a..9005e68 100644 --- a/lxc-apps/frontlinesms/meta +++ b/lxc-apps/frontlinesms/app @@ -1,5 +1,5 @@ { - "version": "2.6.5-190620", + "version": "2.6.5-200313", "meta": { "title": "FrontlineSMS", "desc-cs": "Hromadné odesílání zpráv", @@ -8,10 +8,10 @@ }, "containers": { "frontlinesms": { - "image": "frontlinesms_2.6.5-190620", - "mounts": [ - ["DIR", "/srv/frontlinesms/flsms_data", "/srv/frontlinesms/.frontlinesms2"] - ] + "image": "frontlinesms_2.6.5-200313", + "mounts": { + "frontlinesms/flsms_data": "/srv/frontlinesms/.frontlinesms2" + } } } } diff --git a/lxc-apps/frontlinesms/lxcfile b/lxc-apps/frontlinesms/image similarity index 93% rename from lxc-apps/frontlinesms/lxcfile rename to lxc-apps/frontlinesms/image index da71f2b..b1135fe 100644 --- a/lxc-apps/frontlinesms/lxcfile +++ b/lxc-apps/frontlinesms/image @@ -1,5 +1,5 @@ -IMAGE frontlinesms_2.6.5-190620 -FROM alpine3.9-java8_8.212.04-190620 +IMAGE frontlinesms_2.6.5-200313 +FROM alpine3.11-java8_8.242.08-200313 RUN EOF # Install runtime dependencies @@ -24,7 +24,7 @@ RUN EOF rm /tmp/frontlinesms2.sh EOF -COPY lxc +COPY image.d RUN EOF # Install Czech translation diff --git a/lxc-apps/frontlinesms/lxc/etc/X11/dummy.conf b/lxc-apps/frontlinesms/image.d/etc/X11/dummy.conf similarity index 100% rename from lxc-apps/frontlinesms/lxc/etc/X11/dummy.conf rename to lxc-apps/frontlinesms/image.d/etc/X11/dummy.conf diff --git a/lxc-apps/frontlinesms/lxc/etc/services.d/.s6-svscan/finish b/lxc-apps/frontlinesms/image.d/etc/services.d/.s6-svscan/finish similarity index 100% rename from lxc-apps/frontlinesms/lxc/etc/services.d/.s6-svscan/finish rename to lxc-apps/frontlinesms/image.d/etc/services.d/.s6-svscan/finish diff --git a/lxc-apps/frontlinesms/lxc/etc/services.d/frontlinesms/run b/lxc-apps/frontlinesms/image.d/etc/services.d/frontlinesms/run similarity index 100% rename from lxc-apps/frontlinesms/lxc/etc/services.d/frontlinesms/run rename to lxc-apps/frontlinesms/image.d/etc/services.d/frontlinesms/run diff --git a/lxc-apps/frontlinesms/lxc/etc/services.d/xorg/run b/lxc-apps/frontlinesms/image.d/etc/services.d/xorg/run similarity index 100% rename from lxc-apps/frontlinesms/lxc/etc/services.d/xorg/run rename to lxc-apps/frontlinesms/image.d/etc/services.d/xorg/run diff --git a/lxc-apps/frontlinesms/lxc/srv/frontlinesms/frontlinesms2/web-app/WEB-INF/grails-app/i18n/messages_cs.properties b/lxc-apps/frontlinesms/image.d/srv/frontlinesms/frontlinesms2/web-app/WEB-INF/grails-app/i18n/messages_cs.properties similarity index 100% rename from lxc-apps/frontlinesms/lxc/srv/frontlinesms/frontlinesms2/web-app/WEB-INF/grails-app/i18n/messages_cs.properties rename to lxc-apps/frontlinesms/image.d/srv/frontlinesms/frontlinesms2/web-app/WEB-INF/grails-app/i18n/messages_cs.properties diff --git a/lxc-apps/frontlinesms/lxc/srv/frontlinesms/frontlinesms2/web-app/assets/i18n/frontlinesms-core_messages_cs.js b/lxc-apps/frontlinesms/image.d/srv/frontlinesms/frontlinesms2/web-app/assets/i18n/frontlinesms-core_messages_cs.js similarity index 100% rename from lxc-apps/frontlinesms/lxc/srv/frontlinesms/frontlinesms2/web-app/assets/i18n/frontlinesms-core_messages_cs.js rename to lxc-apps/frontlinesms/image.d/srv/frontlinesms/frontlinesms2/web-app/assets/i18n/frontlinesms-core_messages_cs.js diff --git a/lxc-apps/frontlinesms/install.sh b/lxc-apps/frontlinesms/install.sh index c9cb6f5..89ce519 100755 --- a/lxc-apps/frontlinesms/install.sh +++ b/lxc-apps/frontlinesms/install.sh @@ -1,14 +1,16 @@ #!/bin/sh set -ev +# Volumes +FLSMS_DATA="${VOLUMES_DIR}/frontlinesms/flsms_data" + # Configure FrontlineSMS -mkdir -p /srv/frontlinesms/flsms_data +install -o 108080 -g 108080 -m 750 -d ${FLSMS_DATA} export FRONTLINESMS_ADMIN_USER="admin" export FRONTLINESMS_ADMIN_PWD=$(head -c 12 /dev/urandom | base64 | tr -d '+/=') export FRONTLINESMS_ADMIN_USER_HASH=$(echo -n "${FRONTLINESMS_ADMIN_USER}" | base64) export FRONTLINESMS_ADMIN_PWD_HASH=$(echo -n "${FRONTLINESMS_ADMIN_PWD}" | base64) -envsubst /srv/frontlinesms/flsms_data/app-settings.properties -chown -R 8080:8080 /srv/frontlinesms/flsms_data +envsubst