raimohanska / ourboard

An online whiteboard

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for connecting to PostgreSQL without SSL

akoenig opened this issue · comments

Although it might sound counterintuitive, but there are situations in which SSL might not be necessary, like deploying ourboard on a small machine where the PostgreSQL instance is running within a container 🙂. Overall this would minimize the infrastructural ceremony involved to testdrive ourboard on a machine in the cloud. Right now this is not possible because of the ternary in the db.ts:

ssl: process.env.DATABASE_URL
- Spontaneously, I would say that it might be a good idea to explicitly activate SSL via an environment variable, e.g. DATABASE_SSL_ENABLED=true where the default is false. I would take over the PR if you like 🙂

Happy to hear your thoughts @raimohanska and keep up the awesome work!

Yeah why not! Could you create a PR that doesn’t necessitate env changes on existing dev setups or prod?

@raimohanska Cool! I compiled a PR which is easy on the current env defaults 🙂