Browsing the GitLab Omnibus Postgres Database

After installing GitLab Omnibus edition I wanted to take a look at the database tables.

To do so I installed phpPgAdmin (available in the EPEL repo):

yum install phpPgAdmin

I created a user in Postgres for use with phpPgAdmin:

su - gitlab-psql

/opt/gitlab/embedded/bin/psql gitlabhq_production

gitlabhq_production=# CREATE USER jonny_test WITH PASSWORD 'opensesame';
CREATE ROLE
gitlabhq_production=# GRANT ALL PRIVILEGES ON DATABASE gitlabhq_production to jonny_test;
GRANT
gitlabhq_production=#  GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO jonny_test;
GRANT

gitlabhq_production=# \q

If you have problems running the psql command you may want to specify the the unix socket directory as follows:

/opt/gitlab/embedded/bin/psql -h /var/opt/gitlab/postgresql/    gitlabhq_production

I then checked the phpPgAdmin config file settings:

/usr/share/phpPgAdmin/conf/config.inc.php
$conf['servers'][0]['host'] = 'localhost';

$conf['extra_login_security'] =false;

and protected the phpPgAdmin install by editing the Allow, Deny rules in  /etc/httpd/conf.d/phpPgAdmin.conf

After all of that I was able to browse the GitLab database.

phpPgAdmin

 

4 Responses to “Browsing the GitLab Omnibus Postgres Database”

Leave a Reply

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>