Skip to content

Commit

Permalink
Add doorkeeper_signing_key
Browse files Browse the repository at this point in the history
  • Loading branch information
Rub21 committed Feb 26, 2024
1 parent 6e4241d commit e09697b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions images/web/config/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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-----
6 changes: 6 additions & 0 deletions images/web/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e09697b

Please sign in to comment.