From 37fb7cd5d02d44519f1a7f3c0a0e3dedc69dfce7 Mon Sep 17 00:00:00 2001 From: 3wc <3wc@doesthisthing.work> Date: Wed, 30 Mar 2022 18:08:27 +0200 Subject: [PATCH] Move `migrate` to `abra.sh` command --- README.md | 7 +++---- abra.sh | 6 ++++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1046a68..5c64cae 100644 --- a/README.md +++ b/README.md @@ -34,12 +34,11 @@ Wiki and knowledge base for growing teams ### Post-deploy migration ``` -abra app run YOURAPPNAME app sh -export DATABASE_PASSWORD=$(cat /run/secrets/db_password) -export DATABASE_URL="postgres://outline:${DATABASE_PASSWORD}@${STACK_NAME}_postgres:5432/outline" -yarn db:migrate --env=production-ssl-disabled +abra app cmd YOURAPPNAME app migrate ``` +_As of 2022-03-30, this requires `abra` RC version, run `abra upgrade --rc`._ + ### Setting up your `.env` config Avoid the use of quotes (`"..."`) as much as possible, the NodeJS scripts flip out for some reason on some vars. diff --git a/abra.sh b/abra.sh index 70f8bc5..79a82e9 100644 --- a/abra.sh +++ b/abra.sh @@ -1,5 +1,11 @@ export APP_ENTRYPOINT_VERSION=v4 +migrate() { + export DATABASE_PASSWORD=$(cat /run/secrets/db_password) + export DATABASE_URL="postgres://outline:${DATABASE_PASSWORD}@${STACK_NAME}_postgres:5432/outline" + yarn db:migrate --env=production-ssl-disabled +} + delete_user() { if [ -z "$1" ] || [ -z "$2" ]; then echo "Usage: ... delete_user "