Postgres service does not enable SSL required by some clients by default

An application written in Go is trying to use DATABASE_URL provided by this chart and failing to start on "SSL not enabled" error. The Go psql driver can only enable/disable sslmode while it is enabled by default and not overriden in the DATABASE_URL provided to reflect the DB provided.

I would suggest to include sslmode=${POSTGRES_FORCE_SSLMODE:-disable} in the default DATABASE_URL. Or more generic DATABASE_URL_EXTRA_QS that would be appended to the DATABASE_URL query string without overriding the entire connection string.

Another alternative would be to set up Postgres service with SSL straight away ;-)