From 842837317882cc3f59e9f63ddf0b8a14221683c6 Mon Sep 17 00:00:00 2001 From: Disassembler Date: Thu, 22 Oct 2020 23:03:44 +0200 Subject: [PATCH] Bump Ushahidi to version 4.6.1 on Alpine 3.12 --- lxc-apps/ushahidi/app | 8 ++++---- lxc-apps/ushahidi/image | 8 ++++---- lxc-apps/ushahidi/install/update-conf.sh | 11 +++++++++++ 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/lxc-apps/ushahidi/app b/lxc-apps/ushahidi/app index b9ea951..4257465 100644 --- a/lxc-apps/ushahidi/app +++ b/lxc-apps/ushahidi/app @@ -1,5 +1,5 @@ { - "version": "4.5.0-200621", + "version": "4.6.1-201021", "meta": { "title": "Ushahidi", "desc-cs": "Skupinová reakce na události", @@ -8,7 +8,7 @@ }, "containers": { "ushahidi": { - "image": "ushahidi_4.5.0-200621", + "image": "ushahidi_4.6.1-201021", "depends": [ "ushahidi-redis", "ushahidi-mariadb" @@ -20,14 +20,14 @@ } }, "ushahidi-redis": { - "image": "redis_5.0.7-200621", + "image": "redis_5.0.9-201021", "mounts": { "ushahidi/redis_conf/redis.conf": "etc/redis.conf:file", "ushahidi/redis_data": "var/lib/redis" } }, "ushahidi-mariadb": { - "image": "mariadb_10.4.13-200621", + "image": "mariadb_10.4.15-201021", "mounts": { "ushahidi/mariadb_conf/my.cnf": "etc/my.cnf:file", "ushahidi/mariadb_data": "var/lib/mysql" diff --git a/lxc-apps/ushahidi/image b/lxc-apps/ushahidi/image index d1ec3c6..bb18ac9 100644 --- a/lxc-apps/ushahidi/image +++ b/lxc-apps/ushahidi/image @@ -1,14 +1,14 @@ -IMAGE ushahidi_4.5.0-200621 -FROM alpine3.11-php7.3_7.3.18-200621 +IMAGE ushahidi_4.6.1-201021 +FROM alpine3.12-php7.3_7.3.23-201021 RUN EOF # Install runtime dependencies apk --no-cache add php7-curl php7-imap php7-mysqli php7-pecl-memcached php7-pecl-redis php7-pdo_mysql # Download Ushahidi - wget https://github.com/ushahidi/platform-client/releases/download/v4.5.0/ushahidi-platform-client-bundle-v4.5.0.tar.gz -O - | tar xzf - -C /srv + wget https://github.com/ushahidi/platform-client/releases/download/v4.6.1/ushahidi-platform-client-bundle-v4.6.1.tar.gz -O - | tar xzf - -C /srv mv /srv/ushahidi-platform-client-bundle-* /srv/ushahidi - wget https://github.com/ushahidi/platform/releases/download/v4.5.0/ushahidi-platform-bundle-v4.5.0.tar.gz -O - | tar xzf - -C /srv/ushahidi + wget https://github.com/ushahidi/platform/releases/download/v4.6.2/ushahidi-platform-bundle-v4.6.2.tar.gz -O - | tar xzf - -C /srv/ushahidi mv /srv/ushahidi/ushahidi-platform-bundle-* /srv/ushahidi/platform # Create OS user diff --git a/lxc-apps/ushahidi/install/update-conf.sh b/lxc-apps/ushahidi/install/update-conf.sh index e01071a..de957fa 100755 --- a/lxc-apps/ushahidi/install/update-conf.sh +++ b/lxc-apps/ushahidi/install/update-conf.sh @@ -7,6 +7,12 @@ USHAHIDI_CONF="${VOLUMES_DIR}/ushahidi/ushahidi_conf" HTTP_HOST="${HOST}" [ "${PORT}" != "443" ] && HTTP_HOST="${HTTP_HOST}:${PORT}" +# Start MariaDB container if needed +if [ "$(spoc-container status ushahidi-mariadb)" != "RUNNING" ]; then + STOP_MARIADB=1 + spoc-container start ushahidi-mariadb +fi + # Replacements sed -i "s|\(^\s\+\"backend_url\": \).*|\1\"https://${HTTP_HOST}/platform\",|" ${USHAHIDI_CONF}/config.json API_URL="\"https:\\\/\\\/${HTTP_HOST}\\\/platform\\\/api\\\/v3\\\/config\\\/data-provider\"" @@ -19,3 +25,8 @@ spoc-container exec ushahidi-mariadb -- mysql -e "${QUERY}" ushahidi QUERY="UPDATE \`config\` SET \`config_value\` = '\"${EMAIL}\"' WHERE \`group_name\` LIKE 'site' AND \`config_key\` LIKE 'email'" spoc-container exec ushahidi-mariadb -- mysql -e "${QUERY}" ushahidi sed -i "s|\(^\s\+\"google_analytics_id\": \).*|\1\"${GMAPS_API_KEY}\"|" ${USHAHIDI_CONF}/config.json + +# Stop MariaDB container if needed +if [ -n "${STOP_MARIADB}" ]; then + echo spoc-container stop ushahidi-mariadb +fi