build: relax bbb-graphql-server dir permission (#21084)

This commit is contained in:
Gustavo Trott 2024-08-30 18:56:58 -03:00 committed by GitHub
parent f96a400ca4
commit 4f22dca3de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -23,13 +23,14 @@ case "$1" in
echo "Postgresql configured"
mkdir -p /usr/share/bbb-graphql-server
chmod 755 /usr/share/bbb-graphql-server/ -R
#Generate a random password to Hasura to improve security
if [ ! -f /usr/share/bbb-graphql-server/admin-secret ]; then
mkdir -p /usr/share/bbb-graphql-server
HASURA_RANDOM_ADM_PASSWORD=$(openssl rand -base64 32 | sed 's/=//g' | sed 's/+//g' | sed 's/\///g')
echo "HASURA_GRAPHQL_ADMIN_SECRET=$HASURA_RANDOM_ADM_PASSWORD" > /usr/share/bbb-graphql-server/admin-secret
chown bigbluebutton:bigbluebutton /usr/share/bbb-graphql-server/admin-secret
chmod 600 /usr/share/bbb-graphql-server/admin-secret
chmod 755 /usr/share/bbb-graphql-server/admin-secret
echo "Set a random password to Hasura at /usr/share/bbb-graphql-server/admin-secret"
fi