PostgreSQL is an open-source relational database management system valued for its power, standards-compliance, and extensibility. Whether you’re building a microservice, spinning up test environments, or maintaining a dev copy of production, it’s often easier and cleaner to run Postgres in a container than to install it locally.
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