Skip to content

Commit

Permalink
Update the private key creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Rub21 committed Feb 29, 2024
1 parent c219bd2 commit b539810
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions images/web/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,12 @@ ORGANIZATION_NAME_LOWER=$(echo "$ORGANIZATION_NAME" | tr '[:upper:]' '[:lower:]'
sed -i -e 's/openstreetmap/'"$ORGANIZATION_NAME_LOWER"'/g' "$workdir/config/settings.yml"

# ADDING DOORKEEPER_SIGNING_KEY
openssl genpkey -algorithm RSA -out private.pem
openssl genpkey -algorithm RSA -out private.pem -aes256
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
Expand All @@ -70,7 +71,7 @@ while "$flag" = true; do
fi
sleep 2
done &
time rails i18n:js:export assets:precompile
# time rails i18n:js:export assets:precompile
bundle exec rails db:migrate
# /usr/local/bin/openstreetmap-cgimap \
# --port=8000 \
Expand Down

0 comments on commit b539810

Please sign in to comment.