Please describe in this mandatory section the feature(s) that will be discussed in this topic.
Deploying to Heroku
remote: [2022-02-22 19:26:35] Forest 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?
Please provide in this mandatory section, the relevant information about your configuration:
- Project name: mariacasado
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.