From 5e2a13a93a5c86f5efe3389d0ba6ab2b72ebb994 Mon Sep 17 00:00:00 2001 From: 3wc <3wc@doesthisthing.work> Date: Fri, 21 Jul 2023 10:20:31 +0100 Subject: [PATCH] Add a mode to entrypoint to allow just loading env --- abra.sh | 2 +- entrypoint.sh.tmpl | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/abra.sh b/abra.sh index 59f0f2e..f4e166e 100644 --- a/abra.sh +++ b/abra.sh @@ -1,4 +1,4 @@ -export APP_ENTRYPOINT_VERSION=v7 +export APP_ENTRYPOINT_VERSION=v8 export DB_ENTRYPOINT_VERSION=v2 create_email_user() { diff --git a/entrypoint.sh.tmpl b/entrypoint.sh.tmpl index d511d61..f86a99b 100644 --- a/entrypoint.sh.tmpl +++ b/entrypoint.sh.tmpl @@ -19,5 +19,7 @@ export SECRET_KEY=$(cat /run/secrets/secret_key) export DATABASE_PASSWORD=$(cat /run/secrets/db_password) export DATABASE_URL="postgres://outline:${DATABASE_PASSWORD}@${STACK_NAME}_db:5432/outline" -/usr/local/bin/yarn db:migrate --env=production-ssl-disabled -/usr/local/bin/yarn start "$@" +if [ ! "$1" = "-e" ]; then + /usr/local/bin/yarn db:migrate --env=production-ssl-disabled + /usr/local/bin/yarn start "$@" +fi