We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
platform project:init
Line 10 of platformifier/templates/generic/.environment has the following:
{{ if eq .Database "postgresql" }}export DB_CONNECTION="postgresql"{{ else }}export DB_CONNECTION="${{ .DatabaseUpper }}_SCHEME"{{ end }}
However, Platform.sh has not implemented expanded environment variables, so the environment variable of <DATABASENAME>_SCHEME does not exist.
<DATABASENAME>_SCHEME
In the case of the following example, DB_CONNECTION ends up being empty since MARIADB_SCHEME does not exist:
DB_CONNECTION
MARIADB_SCHEME
export RELATIONSHIPS_JSON="$(echo $PLATFORM_RELATIONSHIPS | base64 --decode)" # Set database environment variables export DB_HOST="$(echo $RELATIONSHIPS_JSON | jq -r '.mariadb[0].host')" export DB_PORT="$(echo $RELATIONSHIPS_JSON | jq -r '.mariadb[0].port')" export DB_DATABASE="$(echo $RELATIONSHIPS_JSON | jq -r '.mariadb[0].path')" export DB_USERNAME="$(echo $RELATIONSHIPS_JSON | jq -r '.mariadb[0].username')" export DB_PASSWORD="$(echo $RELATIONSHIPS_JSON | jq -r '.mariadb[0].password')" export DB_CONNECTION="$MARIADB_SCHEME" export DATABASE_URL="${DB_CONNECTION}://${DB_USERNAME}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_DATABASE}"
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Line 10 of platformifier/templates/generic/.environment has the following:
However, Platform.sh has not implemented expanded environment variables, so the environment variable of
<DATABASENAME>_SCHEME
does not exist.In the case of the following example,
DB_CONNECTION
ends up being empty sinceMARIADB_SCHEME
does not exist:The text was updated successfully, but these errors were encountered: