Skip to content

Latest commit

 

History

History
61 lines (38 loc) · 1.38 KB

README.md

File metadata and controls

61 lines (38 loc) · 1.38 KB

Start the Postgres Database with TLS for Encryption in Transit and pgAdmin4 with Podman

This approach requires podman and podman-compose:

./start.sh

Verify Containers are Running

podman ps -a

Verify connectivity

postgres

Postgres is listening to secure connections on tcp port 5432.

Verify tls encryption
openssl s_client -connect 0.0.0.0:5432 -starttls postgres
Connect to Postgres with psql and require tls encryption
psql --set=sslmode=require -h 0.0.0.0 -p 5432 -U postgres -d mydb

pgadmin4

By default, you can login to pgadmin4 at:

Note: unless you add the Certificate Authority to your host, your browser will get an ssl warning:

https://0.0.0.0:5433/login?next=%2F

Default login credentials which you can change in the compose.yml under the environment variables list:

  • PGADMIN_SETUP_EMAIL

  • PGADMIN_SETUP_PASSWORD

  • Email Address / Username - [email protected]

  • Password - 123321

Initialize the db schema

The default password is postgres, and you can change it in the env/postgres.env file.

./init-db.sh

Verify db schema

psql --set=sslmode=require -h 0.0.0.0 -p 5432 -U postgres -d mydb -c "\dt"