| ... | @@ -37,10 +37,21 @@ Let's make a new user "git" and make it a superuser and the database which gitla |
... | @@ -37,10 +37,21 @@ Let's make a new user "git" and make it a superuser and the database which gitla |
|
|
CREATE USER git CREATEDB;
|
|
CREATE USER git CREATEDB;
|
|
|
CREATE DATABASE gitlabhq_production OWNER git;
|
|
CREATE DATABASE gitlabhq_production OWNER git;
|
|
|
ALTER USER git WITH SUPERUSER;
|
|
ALTER USER git WITH SUPERUSER;
|
|
|
ALTER USER git WITH PASSWORD 'somepassword'
|
|
ALTER USER git WITH PASSWORD 'somepassword';
|
|
|
```
|
|
```
|
|
|
Test that the new user can login:
|
|
Test that the new user can login:
|
|
|
```
|
|
```
|
|
|
sudo -u git -H psql -d gitlabhq_production
|
|
sudo -u git -H psql -d gitlabhq_production
|
|
|
```
|
|
```
|
|
|
|
Edit in /etc/gitlab/gitlab.rb file:
|
|
|
|
|
|
|
|
|
# Disable the built-in Postgres
|
|
|
|
postgresql['enable'] = false
|
|
|
|
|
|
|
|
# Fill in the connection details for database.yml
|
|
|
|
gitlab_rails['db_adapter'] = 'postgresql'
|
|
|
|
gitlab_rails['db_encoding'] = 'utf8'
|
|
|
|
gitlab_rails['db_host'] = '127.0.0.1'
|
|
|
|
gitlab_rails['db_port'] = 5432
|
|
|
|
gitlab_rails['db_username'] = 'git'
|
|
|
|
gitlab_rails['db_password'] = 'somepassword' |