Skip to content

Commit

Permalink
Generate doorkeeper_signing_key and set in config
Browse files Browse the repository at this point in the history
  • Loading branch information
Rub21 committed Feb 26, 2024
1 parent 0a5c069 commit 7af2987
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion images/web/start.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env bash
set -x
workdir="/var/www"
export RAILS_ENV=production

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 7af2987

Please sign in to comment.