You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 17, 2020. It is now read-only.
I don't know how often Heroku makes changes large enough to require resetting the DATABASE_URL value, but breaking up the values of an environmental variable that Heroku automatically sets and updates into user configurable environmental values like DATABASE_PORT will result in a broken app until someone resets those any time this happens.
I looked at the Strapi code to see what it would take to parse the values from DATABASE_URL instead of setting the individual values in the database.js file. Unfortunately I don't think the database.js is as flexible as Drupal's settings.php that can process any PHP. Strapi includes some basic logic in examples in https://strapi.io/documentation/3.0.0-beta.x/concepts/configurations.html#usage, they also reference being "inspired by" https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals. According to Mozilla's template literals documentation, Tags allow you to parse template literals with a function. I don't know it that's an option in the Strapi implementation since it's only "inspired by" the standard.
I know that setting values for DATABASE_PORT is what Strapi recommends in their documentation, but unless we can get this to work with only DATABASE_URL or have a better understanding of when/why/how often Heroku updates the Postgres this approach will likely result in unexpected outages.
The text was updated successfully, but these errors were encountered:
strapi-cms/config/database.js
Line 11 in db024b8
https://devcenter.heroku.com/articles/connecting-to-heroku-postgres-databases-from-outside-of-heroku#credentials
I don't know how often Heroku makes changes large enough to require resetting the DATABASE_URL value, but breaking up the values of an environmental variable that Heroku automatically sets and updates into user configurable environmental values like DATABASE_PORT will result in a broken app until someone resets those any time this happens.
I looked at the Strapi code to see what it would take to parse the values from DATABASE_URL instead of setting the individual values in the database.js file. Unfortunately I don't think the database.js is as flexible as Drupal's settings.php that can process any PHP. Strapi includes some basic logic in examples in https://strapi.io/documentation/3.0.0-beta.x/concepts/configurations.html#usage, they also reference being "inspired by" https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals. According to Mozilla's template literals documentation, Tags allow you to parse template literals with a function. I don't know it that's an option in the Strapi implementation since it's only "inspired by" the standard.
I know that setting values for DATABASE_PORT is what Strapi recommends in their documentation, but unless we can get this to work with only DATABASE_URL or have a better understanding of when/why/how often Heroku updates the Postgres this approach will likely result in unexpected outages.
The text was updated successfully, but these errors were encountered: