1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-08-08 23:15:31 +02:00

provide a fix and documentation for postgres connections, that require ssl mode

This commit is contained in:
nilsorbat 2023-02-24 20:22:07 +01:00
parent bee199c13b
commit 3e5f43ebed
No known key found for this signature in database
GPG key ID: 0F9E4305534A2380
3 changed files with 16 additions and 1 deletions

View file

@ -23,6 +23,11 @@ services:
- TRUST_PROXY=0
- DATABASE_URL=postgresql://postgres@postgres/planka
- SECRET_KEY=notsecretkey
# related: https://github.com/knex/knex/issues/2354
# As knex does not pass query parameters from the connection string we
# have to use environment variables in order to pass the desirec values, e.g.
# note: this is optional
# PGSSLMODE=require
depends_on:
- postgres

View file

@ -9,6 +9,11 @@ SECRET_KEY=notsecretkey
# TRUST_PROXY=0
# TOKEN_EXPIRES_IN=365 # In days
# related: https://github.com/knex/knex/issues/2354
# As knex does not pass query parameters from the connection string we
# have to use environment variables in order to pass the desirec values, e.g.
# PGSSLMODE=<value>
## Do not edit this
TZ=UTC

View file

@ -8,7 +8,12 @@ dotenv.config({
module.exports = {
client: 'pg',
connection: process.env.DATABASE_URL,
connection: {
connectionString: process.env.DATABASE_URL,
ssl: {
rejectUnauthorized: false,
},
},
migrations: {
tableName: 'migration',
directory: path.join(__dirname, 'migrations'),