Commit a3731cf3 authored by Jacob Vosmaer's avatar Jacob Vosmaer

Use peer-based authentication for PostgreSQL

parent 485162ec
...@@ -6,8 +6,8 @@ production: ...@@ -6,8 +6,8 @@ production:
encoding: unicode encoding: unicode
database: gitlabhq_production database: gitlabhq_production
pool: 10 pool: 10
username: git # username: git
password: # password:
# host: localhost # host: localhost
# port: 5432 # port: 5432
# socket: /tmp/postgresql.sock # socket: /tmp/postgresql.sock
......
...@@ -58,7 +58,7 @@ GitLab supports the following databases: ...@@ -58,7 +58,7 @@ GitLab supports the following databases:
sudo -u postgres psql -d template1 sudo -u postgres psql -d template1
# Create a user for GitLab. (change $password to a real password) # Create a user for GitLab. (change $password to a real password)
template1=# CREATE USER git WITH PASSWORD '$password'; template1=# CREATE USER git;
# Create the GitLab production database & grant all privileges on database # Create the GitLab production database & grant all privileges on database
template1=# CREATE DATABASE gitlabhq_production OWNER git; template1=# CREATE DATABASE gitlabhq_production OWNER git;
......
...@@ -216,11 +216,6 @@ Make sure to edit both `gitlab.yml` and `unicorn.rb` to match your setup. ...@@ -216,11 +216,6 @@ Make sure to edit both `gitlab.yml` and `unicorn.rb` to match your setup.
# Mysql # Mysql
sudo -u git cp config/database.yml.mysql config/database.yml sudo -u git cp config/database.yml.mysql config/database.yml
or
# PostgreSQL
sudo -u git cp config/database.yml.postgresql config/database.yml
# Make sure to update username/password in config/database.yml. # Make sure to update username/password in config/database.yml.
# You only need to adapt the production settings (first part). # You only need to adapt the production settings (first part).
# If you followed the database guide then please do as follows: # If you followed the database guide then please do as follows:
...@@ -228,6 +223,12 @@ Make sure to edit both `gitlab.yml` and `unicorn.rb` to match your setup. ...@@ -228,6 +223,12 @@ Make sure to edit both `gitlab.yml` and `unicorn.rb` to match your setup.
# You can keep the double quotes around the password # You can keep the double quotes around the password
sudo -u git -H editor config/database.yml sudo -u git -H editor config/database.yml
or
# PostgreSQL
sudo -u git cp config/database.yml.postgresql config/database.yml
# Make config/database.yml readable to git only # Make config/database.yml readable to git only
sudo -u git -H chmod o-rwx config/database.yml sudo -u git -H chmod o-rwx config/database.yml
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment