Merge pull request #90 from bicisteadm/beaker.session.secret-fix

beaker.session.secret fix
This commit is contained in:
Filip.mihajlovski 2023-02-15 13:13:35 +01:00 committed by GitHub
commit 85e17a91d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 8 deletions

View File

@ -12,10 +12,10 @@ then
done done
fi fi
if grep -E "beaker.session.secret ?= ?$" production.ini if grep -E "beaker.session.secret ?= ?$" $APP_DIR/production.ini
then then
echo "Setting beaker.session.secret in ini file" echo "Setting beaker.session.secret in ini file"
paster --plugin=ckan config-tool $APP_DIR "beaker.session.secret=$(python -c 'import secrets; print(secrets.token_urlsafe())')" paster --plugin=ckan config-tool $APP_DIR/production.ini "beaker.session.secret=$(python -c 'import secrets; print(secrets.token_urlsafe())')"
fi fi
# Set the common uwsgi options # Set the common uwsgi options

View File

@ -12,10 +12,10 @@ then
done done
fi fi
if grep -E "beaker.session.secret ?= ?$" production.ini if grep -E "beaker.session.secret ?= ?$" $APP_DIR/production.ini
then then
echo "Setting beaker.session.secret in ini file" echo "Setting beaker.session.secret in ini file"
paster --plugin=ckan config-tool $APP_DIR "beaker.session.secret=$(python -c 'import secrets; print(secrets.token_urlsafe())')" paster --plugin=ckan config-tool $APP_DIR/production.ini "beaker.session.secret=$(python -c 'import secrets; print(secrets.token_urlsafe())')"
fi fi
# Set the common uwsgi options # Set the common uwsgi options

View File

@ -12,12 +12,12 @@ then
done done
fi fi
if grep -E "beaker.session.secret ?= ?$" production.ini if grep -E "beaker.session.secret ?= ?$" $APP_DIR/production.ini
then then
echo "Setting secrets in ini file" echo "Setting secrets in ini file"
ckan config-tool $APP_DIR "beaker.session.secret=$(python3 -c 'import secrets; print(secrets.token_urlsafe())')" ckan config-tool $APP_DIR/production.ini "beaker.session.secret=$(python3 -c 'import secrets; print(secrets.token_urlsafe())')"
ckan config-tool $APP_DIR "api_token.jwt.encode.secret=$(python3 -c 'import secrets; print("string:" + secrets.token_urlsafe())')" ckan config-tool $APP_DIR/production.ini "api_token.jwt.encode.secret=$(python3 -c 'import secrets; print("string:" + secrets.token_urlsafe())')"
ckan config-tool $APP_DIR "api_token.jwt.decode.secret=$(python3 -c 'import secrets; print("string:" + secrets.token_urlsafe())')" ckan config-tool $APP_DIR/production.ini "api_token.jwt.decode.secret=$(python3 -c 'import secrets; print("string:" + secrets.token_urlsafe())')"
fi fi
echo "Starting UWSGI with '${UWSGI_PROC_NO:-2}' workers" echo "Starting UWSGI with '${UWSGI_PROC_NO:-2}' workers"