Getting strapi working on digitalocean app plattform

Hi, just wondering if someone got strapi v4 working on digitalocean app plattform with postgres.

Here is what I did so far.

  1. created a postgres 13 db and added ari-motors-v2 as trusted service
  2. setup app plattform as a node js service from github.
  3. Add db as component to the app plattform
  4. Set env var DATABASE_URL: ${defaultdb.DATABASE_URL}
  5. 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

1 Like