Mercy Bassey grabs a certificate:
Running Postgres in Docker is great for a quick test but what if you want it to behave like a proper, production-style setup with SSL encryption, certificate-based authentication, persistent volumes, and custom configurations? In this article, we’ll find out how, tackling the various tasks involved such as:
- Generating and using self-signed SSL certificates with Postgres.
- Setting up a PostgreSQL Docker container that uses those certs for encrypted client connections.
- Configuring authentication for both automated services and human users.
- Controling the behavior of your Postgres instance using mounted config files.
Read on to see how.