Hi, just wondering if someone got strapi v4 working on digitalocean app plattform with postgres.
Here is what I did so far.
- created a postgres 13 db and added ari-motors-v2 as trusted service
- setup app plattform as a node js service from github.
- Add db as component to the app plattform
- Set env var DATABASE_URL: ${defaultdb.DATABASE_URL}
- Read config in database.js (this worked on heroku already)
const { host, port, database, user, password } = parse(
process.env.DATABASE_URL
);
return {
connection: {
client: "postgres",
connection: {
host,
port,
database,
user,
password,
},
},
};
Build works, but db connection fails in the end.
Thats the db string
postgresql://doadmin:password@db-postgresql-fra1-48455-do-user-9714386-0.b.db.ondigitalocean.com:25060/defaultdb?sslmode=require
Does the part sslmode=require mean the server needs an ssl cert to work?
I tried to set ssl: false as descibed as a workaround in the docs.
System Information
- Strapi Version: 4.0.0
- Operating System: fedora
- Database: postgres 13
- Node Version: 16
- NPM Version: 8