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, };