Skip to content

Conversation

@mbayucot
Copy link
Contributor

Summary

Add PGSSLMODE, PGSSLCERT, PGSSLKEY and PGSSLROOTCERT to ENV from database config
when running bin/rails dbconsole with postgresql.

```yaml
# config/database.yml

production:
  sslmode: verify-full
  sslcert: client.crt
  sslkey: client.key
  sslrootcert: ca.crt
```

Environment variables

```
PGSSLMODE=verify-full
PGSSLCERT=client.crt
PGSSLKEY=client.key
PGSSLROOTCERT=ca.crt
```

Fixes #43114

@rails-bot rails-bot bot added the railties label Aug 27, 2021
@WarheadsSE
Copy link

Thanks @mbayucot 👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

railties dbconsole does not configure SSL environment for PostgreSQL

3 participants