diff --git a/platformifier/templates/generic/.environment b/platformifier/templates/generic/.environment index 80f7b70..5d1e014 100644 --- a/platformifier/templates/generic/.environment +++ b/platformifier/templates/generic/.environment @@ -32,20 +32,20 @@ export DATABASE_PORT="$DB_PORT" export DATABASE_NAME="$DB_PATH" export DATABASE_USERNAME="$DB_USERNAME" export DATABASE_PASSWORD="$DB_PASSWORD" -export DATABASE_SCHEME="$DB_SCHEME" +export DATABASE_SCHEME="$DB_CONNECTION" # Set secrets needed by Strapi, if they are not set # Prefer setting these as project secret variables with {{ .Assets.Binary }} variable:create env:SECRET_NAME --sensitive=true -if [ -z "$ADMIN_JWT_SECRET" ]; then +if [[ -z "$ADMIN_JWT_SECRET" ]]; then export ADMIN_JWT_SECRET="${{ .Assets.EnvPrefix }}_PROJECT_ENTROPY" fi -if [ -z "$JWT_SECRET" ]; then +if [[ -z "$JWT_SECRET" ]]; then export JWT_SECRET="${{ .Assets.EnvPrefix }}_PROJECT_ENTROPY" fi -if [ -z "$API_TOKEN_SALT"]; then +if [[ -z "$API_TOKEN_SALT" ]]; then export API_TOKEN_SALT="${{ .Assets.EnvPrefix }}_PROJECT_ENTROPY" fi -if [ -z "$APP_KEYS" ]; then +if [[ -z "$APP_KEYS" ]]; then export APP_KEYS="${{ .Assets.EnvPrefix }}_PROJECT_ENTROPY" fi {{- end -}} diff --git a/platformifier/templates/upsun/.environment b/platformifier/templates/upsun/.environment index a16cd02..4952703 100644 --- a/platformifier/templates/upsun/.environment +++ b/platformifier/templates/upsun/.environment @@ -38,16 +38,16 @@ export DATABASE_SCHEME="$DB_SCHEME" # Set secrets needed by Strapi, if they are not set # Prefer setting these as project secret variables with {{ .Assets.Binary }} variable:create env:SECRET_NAME --sensitive=true -if [ -z "$ADMIN_JWT_SECRET" ]; then +if [[ -z "$ADMIN_JWT_SECRET" ]]; then export ADMIN_JWT_SECRET="${{ .Assets.EnvPrefix }}_PROJECT_ENTROPY" fi -if [ -z "$JWT_SECRET" ]; then +if [[ -z "$JWT_SECRET" ]]; then export JWT_SECRET="${{ .Assets.EnvPrefix }}_PROJECT_ENTROPY" fi -if [ -z "$API_TOKEN_SALT"]; then +if [[ -z "$API_TOKEN_SALT" ]]; then export API_TOKEN_SALT="${{ .Assets.EnvPrefix }}_PROJECT_ENTROPY" fi -if [ -z "$APP_KEYS" ]; then +if [[ -z "$APP_KEYS" ]]; then export APP_KEYS="${{ .Assets.EnvPrefix }}_PROJECT_ENTROPY" fi {{- end -}}