From 1b232ef8f390e4b22a1d51a512424a06582583b1 Mon Sep 17 00:00:00 2001 From: Disassembler Date: Wed, 29 Aug 2018 11:04:41 +0200 Subject: [PATCH] Bump Ushahidi to 3.12.3 and use different installation method --- ushahidi/Dockerfile | 15 ++++---- ushahidi/docker/srv/ushahidi/config.js | 3 ++ .../platform/application/config/init.php | 34 +++++++++++++++++++ ushahidi/etc/periodic/15min/ushahidi | 1 + 4 files changed, 46 insertions(+), 7 deletions(-) create mode 100644 ushahidi/docker/srv/ushahidi/config.js create mode 100644 ushahidi/docker/srv/ushahidi/platform/application/config/init.php diff --git a/ushahidi/Dockerfile b/ushahidi/Dockerfile index 89a2a54..718eebc 100644 --- a/ushahidi/Dockerfile +++ b/ushahidi/Dockerfile @@ -7,19 +7,20 @@ RUN \ RUN \ # Download Ushahidi - wget https://github.com/ushahidi/platform-release/releases/download/v3.12.1/ushahidi-platform-release-v3.12.1.tar.gz -O /tmp/ushahidi.tgz \ - && tar xzf /tmp/ushahidi.tgz -C /tmp \ - && mv /tmp/ushahidi-platform-release-v3.12.1/html /srv/ushahidi \ + wget https://github.com/ushahidi/platform-client/releases/download/v3.12.3/ushahidi-platform-client-bundle-v3.12.3.tar.gz -O /tmp/ushahidi-platform-client-bundle.tar.gz \ + && wget https://github.com/ushahidi/platform/releases/download/v3.12.3/ushahidi-platform-bundle-v3.12.3.tar.gz -O /tmp/ushahidi-platform-bundle.tar.gz \ + && tar xzf /tmp/ushahidi-platform-client-bundle.tar.gz -C /srv \ + && mv /srv/ushahidi-platform-client-bundle-v3.12.3 /srv/ushahidi \ + && tar xzf /tmp/ushahidi-platform-bundle.tar.gz -C /srv/ushahidi \ + && mv /srv/ushahidi/ushahidi-platform-bundle-v3.12.3 /srv/ushahidi/platform \ # Create OS user && addgroup -S -g 8014 ushahidi \ && adduser -S -u 8014 -h /srv/ushahidi -s /bin/false -g ushahidi -G ushahidi ushahidi \ && chown -R ushahidi:ushahidi /srv/ushahidi/platform/application/logs /srv/ushahidi/platform/application/cache /srv/ushahidi/platform/application/media/uploads \ # Cleanup - && rm -rf /tmp/ushahidi.tgz /tmp/ushahidi-platform-release-v3.12.1 + && rm -rf /tmp/ushahidi-platform-client-bundle.tar.gz /tmp/ushahidi-platform-bundle.tar.gz -COPY docker/etc/ /etc/ - -COPY --chown=8014:8014 docker/srv/ushahidi/ /srv/ushahidi/ +COPY docker/ / RUN \ # Patch Previewers diff --git a/ushahidi/docker/srv/ushahidi/config.js b/ushahidi/docker/srv/ushahidi/config.js new file mode 100644 index 0000000..1e3d61a --- /dev/null +++ b/ushahidi/docker/srv/ushahidi/config.js @@ -0,0 +1,3 @@ +window.ushahidi = { + backendUrl : "/platform" +}; diff --git a/ushahidi/docker/srv/ushahidi/platform/application/config/init.php b/ushahidi/docker/srv/ushahidi/platform/application/config/init.php new file mode 100644 index 0000000..65d312a --- /dev/null +++ b/ushahidi/docker/srv/ushahidi/platform/application/config/init.php @@ -0,0 +1,34 @@ + + * @package Ushahidi\Application\Config + * @copyright 2013 Ushahidi + * @license https://www.gnu.org/licenses/agpl-3.0.html GNU Affero General Public License Version 3 (AGPL3) + */ + +/** + * Initialize Kohana, setting the default options. + * + * The following options are available: + * + * - string base_url path, and optionally domain, of your application NULL + * - string index_file name of your index file, usually "index.php" index.php + * - string charset internal character set used for input and output utf-8 + * - string cache_dir set the internal cache directory APPPATH/cache + * - integer cache_life lifetime, in seconds, of items cached 60 + * - boolean errors enable or disable error handling TRUE + * - boolean profile enable or disable internal profiling TRUE + * - boolean caching enable or disable internal caching FALSE + * - boolean expose set the X-Powered-By header FALSE + */ +return array( + 'base_url' => '/platform', + 'index_file' => FALSE, + 'charset' => 'utf-8', + 'errors' => TRUE, + 'profile' => FALSE, + 'caching' => FALSE, +); diff --git a/ushahidi/etc/periodic/15min/ushahidi b/ushahidi/etc/periodic/15min/ushahidi index 6ff13a1..4a23c13 100755 --- a/ushahidi/etc/periodic/15min/ushahidi +++ b/ushahidi/etc/periodic/15min/ushahidi @@ -5,4 +5,5 @@ if docker ps | grep -q 'ushahidi$'; then docker exec ushahidi sh -c 'cd /srv/ushahidi/platform && bin/ushahidi dataprovider incoming' >/dev/null docker exec ushahidi sh -c 'cd /srv/ushahidi/platform && bin/ushahidi savedsearch' >/dev/null docker exec ushahidi sh -c 'cd /srv/ushahidi/platform && bin/ushahidi notification queue' >/dev/null + docker exec ushahidi sh -c 'cd /srv/ushahidi/platform && bin/ushahidi webhook send' >/dev/null fi