By AkifMursalov
I have a project on Nest.js that I want to deploy to DigitalOcean apps. I am creating several containers (database container and app container). As database I use postgresql, ORM is prisma. But while I am trying to deploy my project I get an error that says that my database is not running in the given server (PrismaClientInitializationError: Can’t reach database server at db:5432).‘db’ is the name of my container that creates in docker-compose.yml file. What could be the problem causing this? I tried to change the server name (‘db’) to my application server name, but it did not solved the problem.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi @akifmursalov,
The Firewall/Authorized Access always comes to mind when someone is experiencing such issues.
See if you have allowed access to the said Database from the place where you are connecting.
What is your Database connection string? To where it should connect to, are you using DigitalOcean’s Managed Database? If yes, check the following tutorial on how to connect;
https://docs.digitalocean.com/products/databases/postgresql/how-to/connect/
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.