From d326b5a36a571ec7f113ccb8632ec38efe805a24 Mon Sep 17 00:00:00 2001 From: Faruk AYDIN Date: Thu, 8 Dec 2022 13:16:47 +0300 Subject: [PATCH] chore: Add migration for webhook secret key --- docker/compose-entrypoint.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docker/compose-entrypoint.sh b/docker/compose-entrypoint.sh index 60e59f8c..c02ae988 100755 --- a/docker/compose-entrypoint.sh +++ b/docker/compose-entrypoint.sh @@ -15,6 +15,12 @@ fi # initiate env. vars. from /automatisch/storage/.env file export $(grep -v '^#' /automatisch/storage/.env | xargs) +# migration for webhook secret key, will be removed in the future. +if [[ -z "${WEBHOOK_SECRET_KEY}" ]]; then + WEBHOOK_SECRET_KEY="$(openssl rand -base64 36)" + echo "WEBHOOK_SECRET_KEY=$WEBHOOK_SECRET_KEY" >> /automatisch/storage/.env +fi + echo "Environment variables have been set!" sh /entrypoint.sh