Skip to content

Commit

Permalink
Merge pull request #195 from spk/ruby-rails-connection
Browse files Browse the repository at this point in the history
Override DB_CONNECTION for Ruby adaptor name
  • Loading branch information
akalipetis authored Jan 19, 2024
2 parents 1a3ff46 + 47b908d commit 19e15b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion platformifier/templates/generic/.environment
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export DB_PORT="$(echo $RELATIONSHIPS_JSON | jq -r '.{{ .Database }}[0].port')"
export DB_DATABASE="$(echo $RELATIONSHIPS_JSON | jq -r '.{{ .Database }}[0].path')"
export DB_USERNAME="$(echo $RELATIONSHIPS_JSON | jq -r '.{{ .Database }}[0].username')"
export DB_PASSWORD="$(echo $RELATIONSHIPS_JSON | jq -r '.{{ .Database }}[0].password')"
export DB_CONNECTION="$(echo $RELATIONSHIPS_JSON | jq -r '.{{ .Database }}[0].scheme')"
{{ if eq .Database "postgresql" }}export DB_CONNECTION="postgresql"{{ else }}export DB_CONNECTION="${{ .DatabaseUpper }}_SCHEME"{{ end }}
export DATABASE_URL="${DB_CONNECTION}://${DB_USERNAME}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_DATABASE}"
{{- end -}}
{{- if .Cache }}
Expand Down
2 changes: 1 addition & 1 deletion platformifier/templates/upsun/.environment
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export DB_PORT="${{ .DatabaseUpper }}_PORT"
export DB_PATH="${{ .DatabaseUpper }}_PATH"
export DB_USERNAME="${{ .DatabaseUpper }}_USERNAME"
export DB_PASSWORD="${{ .DatabaseUpper }}_PASSWORD"
export DB_SCHEME="${{ .DatabaseUpper }}_SCHEME"
{{ if eq .Database "postgresql" }}export DB_SCHEME="postgresql"{{ else }}export DB_SCHEME="${{ .DatabaseUpper }}_SCHEME"{{ end }}
export DATABASE_URL="${DB_SCHEME}://${DB_USERNAME}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_PATH}"
{{- end -}}
{{- if eq .Stack.Name "laravel" }}
Expand Down

0 comments on commit 19e15b3

Please sign in to comment.