From 7af29870a02ff112332b86de0c5b3db43fe6cc43 Mon Sep 17 00:00:00 2001 From: Rub21 Date: Mon, 26 Feb 2024 20:00:02 +0000 Subject: [PATCH] Generate doorkeeper_signing_key and set in config --- images/web/start.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/images/web/start.sh b/images/web/start.sh index a6c333bf..12c28f4f 100755 --- a/images/web/start.sh +++ b/images/web/start.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash -set -x workdir="/var/www" export RAILS_ENV=production @@ -50,6 +49,12 @@ chmod 0775 /var/www/log touch /var/www/log/production.log chmod 0664 /var/www/log/production.log +# Add DOORKEEPER_SIGNING_KEY +openssl genpkey -algorithm RSA -out private.pem +chmod 400 /var/www/private.pem +export DOORKEEPER_SIGNING_KEY=$(cat /var/www/private.pem | sed -e '1d;$d' | tr -d '\n') +sed -i "s#PRIVATE_KEY#${DOORKEEPER_SIGNING_KEY}#" $workdir/config/settings.yml + #### CHECK IF DB IS ALREADY UP AND START THE APP flag=true site_loading=true