From 0f89b0ae4b06fec58b0a226f0dd1cef40eabf226 Mon Sep 17 00:00:00 2001 From: Disassembler Date: Thu, 22 Oct 2020 23:01:33 +0200 Subject: [PATCH] Bump Pandora to newer commit on Alpine 3.12, add update script --- lxc-apps/pandora/app | 8 ++++---- lxc-apps/pandora/image | 4 ++-- lxc-apps/pandora/update.sh | 16 ++++++++++++++++ 3 files changed, 22 insertions(+), 6 deletions(-) create mode 100755 lxc-apps/pandora/update.sh diff --git a/lxc-apps/pandora/app b/lxc-apps/pandora/app index 51ab486..3dba7c7 100644 --- a/lxc-apps/pandora/app +++ b/lxc-apps/pandora/app @@ -1,5 +1,5 @@ { - "version": "0.0.1-200621", + "version": "0.0.1-201021", "meta": { "title": "Pan.do/ra", "desc-cs": "Archiv mediĆ­", @@ -8,7 +8,7 @@ }, "containers": { "pandora": { - "image": "pandora_0.0.1-200621", + "image": "pandora_0.0.1-201021", "depends": [ "pandora-postgres", "pandora-rabbitmq" @@ -19,13 +19,13 @@ } }, "pandora-postgres": { - "image": "postgres_12.2.0-200621", + "image": "postgres_12.4.0-201021", "mounts": { "pandora/postgres_data": "var/lib/postgresql" } }, "pandora-rabbitmq": { - "image": "rabbitmq_3.8.9-201013", + "image": "rabbitmq_3.8.9-201021", "mounts": { "pandora/rabbitmq_data": "var/lib/rabbitmq/mnesia" } diff --git a/lxc-apps/pandora/image b/lxc-apps/pandora/image index 4885f66..7f48115 100644 --- a/lxc-apps/pandora/image +++ b/lxc-apps/pandora/image @@ -1,5 +1,5 @@ -IMAGE pandora_0.0.1-200621 -FROM alpine3.11-python3.8_3.8.2-200621 +IMAGE pandora_0.0.1-201021 +FROM alpine3.12-python3.8_3.8.5-201021 RUN EOF # Install runtime dependencies diff --git a/lxc-apps/pandora/update.sh b/lxc-apps/pandora/update.sh new file mode 100755 index 0000000..71ce999 --- /dev/null +++ b/lxc-apps/pandora/update.sh @@ -0,0 +1,16 @@ +#!/bin/sh +set -ev + +# Start service containers +spoc-container start pandora-postgres +spoc-container start pandora-rabbitmq + +# Run database migration +spoc-container exec pandora -- /srv/pandora/pandora/manage.py migrate --noinput +spoc-container exec pandora -- /srv/pandora/pandora/manage.py sqlfindindex +spoc-container exec pandora -- /srv/pandora/pandora/manage.py sync_itemsort +spoc-container exec pandora -- /srv/pandora/pandora/manage.py sync_documentsort + +# Stop service containers +spoc-container stop pandora-rabbitmq +spoc-container stop pandora-postgres