From 60d9ceb4b5cf36245ae127c6b30dd7c8088a7072 Mon Sep 17 00:00:00 2001 From: Maksim Eltyshev Date: Mon, 6 Mar 2023 13:52:12 +0100 Subject: [PATCH] ref: Rename environment variable --- docker-compose.yml | 5 +++-- server/.env.sample | 2 +- server/db/knexfile.js | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index a0b29b3..20f5e1b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -23,13 +23,14 @@ 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 desired values, e.g. - # PGSSLMODE= + # - PGSSLMODE= # Configure knex to accept SSL certificates - # REJECT_UNAUTHORIZED_SSL_CERTIFICATE=false + # - KNEX_REJECT_UNAUTHORIZED_SSL_CERTIFICATE=false depends_on: - postgres diff --git a/server/.env.sample b/server/.env.sample index 6f649ee..9024a6b 100644 --- a/server/.env.sample +++ b/server/.env.sample @@ -15,7 +15,7 @@ SECRET_KEY=notsecretkey # PGSSLMODE= # Configure knex to accept SSL certificates -# REJECT_UNAUTHORIZED_SSL_CERTIFICATE=false +# KNEX_REJECT_UNAUTHORIZED_SSL_CERTIFICATE=false ## Do not edit this diff --git a/server/db/knexfile.js b/server/db/knexfile.js index bb73008..fdd4a7e 100755 --- a/server/db/knexfile.js +++ b/server/db/knexfile.js @@ -7,7 +7,7 @@ dotenv.config({ }); function buildSSLConfig() { - if (process.env.REJECT_UNAUTHORIZED_SSL_CERTIFICATE === 'false') { + if (process.env.KNEX_REJECT_UNAUTHORIZED_SSL_CERTIFICATE === 'false') { return { rejectUnauthorized: false, };