From bb2868a583e11633a9b83cd6ad0df378f3d1d032 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Delobelle?= Date: Sun, 17 Jun 2018 18:38:51 +0200 Subject: [PATCH] Add script for migrations --- provisioning/move_apps.sh | 60 +++++++++++++++++++++++++++++++ provisioning/move_apps_helpers.sh | 37 +++++++++++++++++++ provisioning/test_move_apps.sh | 57 +++++++++++++++++++++++++++++ 3 files changed, 154 insertions(+) create mode 100755 provisioning/move_apps.sh create mode 100644 provisioning/move_apps_helpers.sh create mode 100644 provisioning/test_move_apps.sh diff --git a/provisioning/move_apps.sh b/provisioning/move_apps.sh new file mode 100755 index 00000000..cbe858a1 --- /dev/null +++ b/provisioning/move_apps.sh @@ -0,0 +1,60 @@ +#!/bin/sh + +cp cof/settings/secret.py gestioCOF/settings/secret.py + +# Exit on error +set -e + +. provisioning/move_apps_helpers.sh + +echo "-----" + +echo "»»» Stopping services…" +systemctl stop daphne +systemctl stop worker + +echo "»»» Updating database…" +_psql <