Error: getaddrinfo ENOTFOUND ${db.HOSTNAME}

From the Strapi Digital Ocean deployment docs:

The default database name is “db” and is used to prefix the database values in the global environment table. If another database name is used, it should be substituted for “db”.

At first, when I renamed my database from db to new-database-name, I forgot to update the app-level environment variables accordingly.

When I changed ${db.HOSTNAME} to ${new-database-name.HOSTNAME} (and did the same for all the others) the deployment worked.

3 Likes