Update boop-keys/setup-boop.sh
This commit is contained in:
parent
e9aace91ac
commit
8982fa741a
1 changed files with 8 additions and 1 deletions
|
@ -15,6 +15,11 @@ echo "[BOOTSTRAP] DB Configured, setting up .env file..."
|
|||
|
||||
# read /home/coder/.coder-env as they contain the workspace name and username
|
||||
|
||||
echo "[BOOTSTRAP] Generating Encryption Secret"
|
||||
|
||||
# generate encryption secret
|
||||
encryption_secret=$(openssl rand -base64 32)
|
||||
|
||||
WORKSPACE_ENV=$(cat /home/coder/.coder-env | grep WORKSPACE_ENV | cut -d '=' -f2)
|
||||
USERNAME_ENV=$(cat /home/coder/.coder-env | grep USERNAME_ENV | cut -d '=' -f2)
|
||||
|
||||
|
@ -26,5 +31,7 @@ sed -i "s/DATABASE_NAME=/DATABASE_NAME=oauth_provider/g" /home/coder/oauth-provi
|
|||
sed -i "s/REDIS_HOST=/REDIS_HOST=localhost/g" /home/coder/oauth-provider/.env
|
||||
sed -i "s/REDIS_PORT=/REDIS_PORT=6379/g" /home/coder/oauth-provider/.env
|
||||
sed -i "s/BASE_LOCAL_URL=/BASE_LOCAL_URL=https:\/\/3123--$WORKSPACE_ENV--$USERNAME_ENV.coder.kakio.us/g" /home/coder/oauth-provider/.env
|
||||
echo "" >> /home/coder/oauth-provider/.env
|
||||
echo "ENCRYPTION_SECRET=$encryption_secret" >> /home/coder/oauth-provider/.env
|
||||
|
||||
echo "[BOOTSTRAP] Script has finished running."
|
||||
echo "[BOOTSTRAP] Done!"
|
Loading…
Reference in a new issue