Can't deploy Forest to Heroku

Feature(s) impacted

Please describe in this mandatory section the feature(s) that will be discussed in this topic.
Deploying to Heroku

Failure Logs

remote: [2022-02-22 19:26:35] Forest :deciduous_tree::deciduous_tree::deciduous_tree: No Apimap sent to Forest servers, it seems that the database is not accessible:
remote: connection to server at β€œ127.0.0.1”, port 5432 failed: Connection refused
remote: Is the server running on that host and accepting TCP/IP connections?

Context

Please provide in this mandatory section, the relevant information about your configuration:

  • Project name: mariacasado

Welcome @Mica_Jenik

This error happens when your agent can’t reach the database at startup.

In this case, I see in the error log that you posted, that your agent is configured to search for the database in "localhost’, which is unlikely in a heroku environment.

Changing the DATABASE_URL environment variable to an URI pointing to your database server should solve the issue.

Thank you so much ! And where can I find the database_url field?

To change environment variables on heroku, I can only refer you to their documentation: Configuration and Config Vars | Heroku Dev Center

About the value of the variable itself, it depends on where your database is hosted.