Also if you simultaneously set MB_DB_TYPE: https://github.com/metabase/metabase/blob/v0.28.5/src/metabase/db.clj#L70 ??
edit: Here’s another user who got it working in December: Customizable connection string for application database setup (sslmode) (whole topic might be worth reading).
Also worth checking if your database needs some config: https://www.postgresql.org/message-id/51DB5D65.6040708%40gmail.com - can you connect to it using another client (from same place as Metabase, using SSL and does the database enforce it?)