I'm trying to find a straightforward tutorial for setting up Postgres with SSL using Docker Compose. I've been struggling to find a reliable guide since many tutorials I've come across are either too complicated or not ideal. I want to ensure it's a secure setup with a password and SSL, but I don't need anything too fancy. If anyone can point me in the direction of a tutorial that worked for them, I'd really appreciate it!
2 Answers
I set up my Postgres using Docker Swarm and Portainer, and I utilized Cloudflare for SSL if I needed external access. It worked pretty well!
Are you just looking to run Postgres with SSL certs? If so, are you planning to use self-signed certificates or maybe Let's Encrypt? And are you interested in just the server side or both server and client? Also, which Docker container are you using?

I'm using self-signed certificates for client-server communication with Docker Compose, and I want to use Postgres 17.5!