Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SSL support for postgresql in bin/rails dbconsole #43118

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