From e09697be1633287f7f4e0e511947fec49145f9a3 Mon Sep 17 00:00:00 2001 From: Rub21 Date: Mon, 26 Feb 2024 14:21:57 -0500 Subject: [PATCH] Add doorkeeper_signing_key --- images/web/config/settings.yml | 6 ++++++ images/web/start.sh | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/images/web/config/settings.yml b/images/web/config/settings.yml index 173f3db8..7d6c4023 100644 --- a/images/web/config/settings.yml +++ b/images/web/config/settings.yml @@ -147,3 +147,9 @@ initial_changeset_comments_per_hour: 6 max_changeset_comments_per_hour: 60 moderator_changeset_comments_per_hour: 36000 embed_server_url: "https://embed.openhistoricalmap.org/" + +# Private key for signing id_tokens +doorkeeper_signing_key: | + -----BEGIN PRIVATE KEY----- + PRIVATE_KEY + -----END PRIVATE KEY----- diff --git a/images/web/start.sh b/images/web/start.sh index acb73a8e..59ed2831 100755 --- a/images/web/start.sh +++ b/images/web/start.sh @@ -45,6 +45,12 @@ sed -i -e 's/overpass-api.de/'$OVERPASS_URL'/g' $workdir/config/settings.yml sed -i -e 's/overpass-api.de/'$OVERPASS_URL'/g' $workdir/app/views/site/export.html.erb sed -i -e 's/overpass-api.de/'$OVERPASS_URL'/g' $workdir/app/assets/javascripts/index/export.js +# 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 while "$flag" = true; do