fbpixel

Manage a containerized PostgreSQL

Tommaso Doninelli}
Tommaso Doninelli
Share:

How to create and manage a PostgreSQL db running in HakunaCloud.

pgAdmin is the leading Open Source management tool for Postgres. In this how to, you will deploy a temporary pgAdmin container in order to access a PostgreSQL instance running in HakunaCloud

Deploy pgAdmin

pgAdmin container must run in the same network of the PostgreSQL database we want to manage. To get the name of the network, we can use the command hakuna ps -j. In our case, the network is pg_net.

Once we have the network id, we can just run pgAdmin

1
2
3
4
5
6
7
hakuna run -p 80:80 \
    --name pgadmin \
    --network jira-net \
    -e "PGADMIN_DEFAULT_EMAIL=totomz@domain.com" \
    -e "PGADMIN_DEFAULT_PASSWORD=CapitanoSolo" \
    -v pgadmin:/var/lib/pgadmin \
    dpage/pgadmin4

Remember to use a persistent volume, in order to have access to the files and the dumps

Run hakuna ps to get the pgadmiin url

How To backup a PostgreSQL container?

Tommaso Doninelli

CEO @ HakunaCloud

10 years as CTO, former Software Engineer at Amazon AWS, Cloud Solution Architect with projects in US, Europe and United Arab Emirates.

"I am a DevOps and automation advocate; you can test, deploy, analyze and improve even your grandma recipes. "