BigW Consortium Gitlab

Commit 1090514a by Rémy Coutable

Merge branch 'improve-database-yml-examples' into 'master'

Improve database yml examples See merge request gitlab-org/gitlab-ce!10247
parents b3f74903 c17570d3
......@@ -10,7 +10,7 @@ production:
pool: 10
username: git
password: "secure password"
# host: localhost
host: localhost
# socket: /tmp/mysql.sock
#
......@@ -25,7 +25,22 @@ development:
pool: 5
username: root
password: "secure password"
# host: localhost
host: localhost
# socket: /tmp/mysql.sock
#
# Staging specific
#
staging:
adapter: mysql2
encoding: utf8
collation: utf8_general_ci
reconnect: false
database: gitlabhq_staging
pool: 10
username: git
password: "secure password"
host: localhost
# socket: /tmp/mysql.sock
# Warning: The database defined as "test" will be erased and
......@@ -40,6 +55,6 @@ test: &test
pool: 5
username: root
password:
# host: localhost
host: localhost
# socket: /tmp/mysql.sock
prepared_statements: false
......@@ -6,10 +6,9 @@ production:
encoding: unicode
database: gitlabhq_production
pool: 10
# username: git
# password:
# host: localhost
# port: 5432
username: git
password: "secure password"
host: localhost
#
# Development specific
......@@ -20,8 +19,8 @@ development:
database: gitlabhq_development
pool: 5
username: postgres
password:
# host: localhost
password: "secure password"
host: localhost
#
# Staging specific
......@@ -30,10 +29,10 @@ staging:
adapter: postgresql
encoding: unicode
database: gitlabhq_staging
pool: 5
username: postgres
password:
# host: localhost
pool: 10
username: git
password: "secure password"
host: localhost
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
......@@ -45,5 +44,5 @@ test: &test
pool: 5
username: postgres
password:
# host: localhost
host: localhost
prepared_statements: false
......@@ -27,11 +27,9 @@ fi
cp config/database.yml.$GITLAB_DATABASE config/database.yml
if [ "$GITLAB_DATABASE" = 'postgresql' ]; then
sed -i 's/# host:.*/host: postgres/g' config/database.yml
sed -i 's/localhost/postgres/g' config/database.yml
else # Assume it's mysql
sed -i 's/username:.*/username: root/g' config/database.yml
sed -i 's/password:.*/password:/g' config/database.yml
sed -i 's/# host:.*/host: mysql/g' config/database.yml
sed -i 's/localhost/mysql/g' config/database.yml
fi
cp config/resque.yml.example config/resque.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