Reputation: 857
I am running pgadmin and postgres through docker-compose and both are in same network, so I am able to connect to posgtres from pgadmin after configuring the server in pgadmin. If I do docker-compose down
, all containers are destroyed so my server configuration in pgadmin will be lost. If I do docker-compose up
again, I will have to configure the server from pgadmin ui again. I want to avoid this manual process of configuring server in pgadmin.
Upvotes: 2
Views: 861
Reputation: 176
Create a volume and mount the volume in the pgadmin container where config is stored (/etc/pgadmin for Linux). Now your changes will be persisted across restarts.
https://docs.docker.com/compose/compose-file/compose-file-v3/#volumes
Upvotes: 1