Skip to content

Commit

Permalink
Revert "feat: Allow postgres connections that require ssl mode (#404)"
Browse files Browse the repository at this point in the history
This reverts commit eea57ff.
  • Loading branch information
meltyshev authored Feb 27, 2023
1 parent 02eabd2 commit 49767e4
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 16 deletions.
5 changes: 0 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ 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.
# note: this is optional
# PGSSLMODE=require
depends_on:
- postgres

Expand Down
5 changes: 0 additions & 5 deletions server/.env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ 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 desired values, e.g.
# PGSSLMODE=<value>

## Do not edit this

TZ=UTC
7 changes: 1 addition & 6 deletions server/db/knexfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@ dotenv.config({

module.exports = {
client: 'pg',
connection: {
connectionString: process.env.DATABASE_URL,
ssl: {
rejectUnauthorized: false,
},
},
connection: process.env.DATABASE_URL,
migrations: {
tableName: 'migration',
directory: path.join(__dirname, 'migrations'),
Expand Down

0 comments on commit 49767e4

Please sign in to comment.