raimohanska / ourboard

An online whiteboard
Other
763 stars 58 forks source link

Support for connecting to PostgreSQL without SSL #179

Closed akoenig closed 3 years ago

akoenig commented 3 years ago

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: https://github.com/raimohanska/ourboard/blob/b07f983440872ec6954b20e8152c50fda21d8f1d/backend/src/db.ts#L9 - 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!

raimohanska commented 3 years ago

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

akoenig commented 3 years ago

@raimohanska Cool! I compiled a PR which is easy on the current env defaults πŸ™‚