Often when deployments contain SQL databases like Postgresq, Mysql, Mariadb, we would like to connect to that database and get a sneak peak into data. There are 2 ways to do it:
Expose database via URL so that sql clients like command line tools and GUIs can connect.
Have a web UI through which database can be accessed.
This document will explore how to use web UI to access database using OmniDB. OmniDB is web tool for managing multiple databases. We can run OmniDB as a container which connects to the database deployed.
Dockup team has customized OmniDB docker image so that OmniDB can be easily used with deployments. Edit blueprint and add a container called OmniDB. We need to configure this container with following env variables:
Values can be one of
Username used to connect to db. Can be admin user also
Port exposed by database container
Use special env variables, and connect to the database
container in the deployment.
Name of the database to connect
Once we enter all these values, it looks something like this
Once blueprint is deployed, we can access web UI as part of deployment
Click on link next to "OmniDB" and we should see an interface to add
pwd. Please enter
Now, we see OmniDB interface where name of database to access will be on top right corner
+ icon (In this case MySQL). Interface will ask for database password. Enter the password, and we can now access the database
Now we can perform CRUD operations using query interface
For further information (if required), please drop a mail to firstname.lastname@example.org