Bump Ushahidi to version 4.6.1 on Alpine 3.12
This commit is contained in:
parent
ddcca22498
commit
8428373178
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"version": "4.5.0-200621",
|
"version": "4.6.1-201021",
|
||||||
"meta": {
|
"meta": {
|
||||||
"title": "Ushahidi",
|
"title": "Ushahidi",
|
||||||
"desc-cs": "Skupinová reakce na události",
|
"desc-cs": "Skupinová reakce na události",
|
||||||
@ -8,7 +8,7 @@
|
|||||||
},
|
},
|
||||||
"containers": {
|
"containers": {
|
||||||
"ushahidi": {
|
"ushahidi": {
|
||||||
"image": "ushahidi_4.5.0-200621",
|
"image": "ushahidi_4.6.1-201021",
|
||||||
"depends": [
|
"depends": [
|
||||||
"ushahidi-redis",
|
"ushahidi-redis",
|
||||||
"ushahidi-mariadb"
|
"ushahidi-mariadb"
|
||||||
@ -20,14 +20,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ushahidi-redis": {
|
"ushahidi-redis": {
|
||||||
"image": "redis_5.0.7-200621",
|
"image": "redis_5.0.9-201021",
|
||||||
"mounts": {
|
"mounts": {
|
||||||
"ushahidi/redis_conf/redis.conf": "etc/redis.conf:file",
|
"ushahidi/redis_conf/redis.conf": "etc/redis.conf:file",
|
||||||
"ushahidi/redis_data": "var/lib/redis"
|
"ushahidi/redis_data": "var/lib/redis"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ushahidi-mariadb": {
|
"ushahidi-mariadb": {
|
||||||
"image": "mariadb_10.4.13-200621",
|
"image": "mariadb_10.4.15-201021",
|
||||||
"mounts": {
|
"mounts": {
|
||||||
"ushahidi/mariadb_conf/my.cnf": "etc/my.cnf:file",
|
"ushahidi/mariadb_conf/my.cnf": "etc/my.cnf:file",
|
||||||
"ushahidi/mariadb_data": "var/lib/mysql"
|
"ushahidi/mariadb_data": "var/lib/mysql"
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
IMAGE ushahidi_4.5.0-200621
|
IMAGE ushahidi_4.6.1-201021
|
||||||
FROM alpine3.11-php7.3_7.3.18-200621
|
FROM alpine3.12-php7.3_7.3.23-201021
|
||||||
|
|
||||||
RUN EOF
|
RUN EOF
|
||||||
# Install runtime dependencies
|
# Install runtime dependencies
|
||||||
apk --no-cache add php7-curl php7-imap php7-mysqli php7-pecl-memcached php7-pecl-redis php7-pdo_mysql
|
apk --no-cache add php7-curl php7-imap php7-mysqli php7-pecl-memcached php7-pecl-redis php7-pdo_mysql
|
||||||
|
|
||||||
# Download Ushahidi
|
# 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
|
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
|
mv /srv/ushahidi/ushahidi-platform-bundle-* /srv/ushahidi/platform
|
||||||
|
|
||||||
# Create OS user
|
# Create OS user
|
||||||
|
@ -7,6 +7,12 @@ USHAHIDI_CONF="${VOLUMES_DIR}/ushahidi/ushahidi_conf"
|
|||||||
HTTP_HOST="${HOST}"
|
HTTP_HOST="${HOST}"
|
||||||
[ "${PORT}" != "443" ] && HTTP_HOST="${HTTP_HOST}:${PORT}"
|
[ "${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
|
# Replacements
|
||||||
sed -i "s|\(^\s\+\"backend_url\": \).*|\1\"https://${HTTP_HOST}/platform\",|" ${USHAHIDI_CONF}/config.json
|
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\""
|
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'"
|
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
|
spoc-container exec ushahidi-mariadb -- mysql -e "${QUERY}" ushahidi
|
||||||
sed -i "s|\(^\s\+\"google_analytics_id\": \).*|\1\"${GMAPS_API_KEY}\"|" ${USHAHIDI_CONF}/config.json
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user