pgAdmin is a free open source graphical management tool for PostgreSQL. This is the configuration and usage guide for running pgAdmin on the local computer in docker under local Traefik with self-signed SSL certificates.
Before starting, you need to configure and run local Traefik. PgAdmin is one of the clients of the local Traefik.
In this guide, the local domain name of pgAdmin application is pgadmin.local. You can use another domain name, but you need to use it in all steps instead of pgadmin.local and change it in the host rule of the traefik-router in docker-compose.yml in this repository.
Add the domain name of service into the hosts file (use ip of the localhost):
127.0.0.1 pgadmin.local
- Go to the folder
certsin the shell and generate a self-signed certificate for the domain name with mkcert:
mkcert --cert-file pgadmin.local.crt --key-file pgadmin.local.key pgadmin.local- Add generated certificate's and key's paths to the dynamic configuration file
tls_certificates.local.ymlin theconffolder:
...
- certFile: "/etc/traefik/certs/pgadmin.local.crt"
keyFile: "/etc/traefik/certs/pgadmin.local.key"You don't need to restart local_traefik container after these steps, the configuration applies dynamically.
After finishing with the configuration steps open root folder of the local_pgadmin repository in the shell and run the command
docker-compose up --build -dAfter that, open https://pgadmin.local in browser to see pGadmin application.