Good morning, I am attempting to deploy a Django app on a DO Droplet and connect it to a DO managed postgresql instance and I am running into an interesting problem. I have set up numerous Django apps in the past but all on a private company network so the security was never an issue. This is my first attempt on DO with a public app. I run my connection string on the droplet server and appear to make a successful connection. I get a message regarding the protocol and cipher for the SSL connection and I get a PSQL prompt, as expected. I run a CREATE DATABASE statement successfully. When I list the databases, I see my newly created database. But, when I try to run a PSQL connection statement I get this error:
connection to server at “[database name from connection string].c.db.ondigitalocean.com” (10.x.x.x), port 25061 failed: FATAL: no such database: [newly created database]
connection to server at “[database name from connection string].c.db.ondigitalocean.com” (10.x.x.x), port 25061 failed: FATAL: SSL required
How can I use PSQL from my droplet to configure the DB and make sure the app runs when I install it? Thanks in advance!
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!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.