Commit 1090514a authored by Rémy Coutable's avatar 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: ...@@ -10,7 +10,7 @@ production:
pool: 10 pool: 10
username: git username: git
password: "secure password" password: "secure password"
# host: localhost host: localhost
# socket: /tmp/mysql.sock # socket: /tmp/mysql.sock
# #
...@@ -25,7 +25,22 @@ development: ...@@ -25,7 +25,22 @@ development:
pool: 5 pool: 5
username: root username: root
password: "secure password" 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 # socket: /tmp/mysql.sock
# Warning: The database defined as "test" will be erased and # Warning: The database defined as "test" will be erased and
...@@ -40,6 +55,6 @@ test: &test ...@@ -40,6 +55,6 @@ test: &test
pool: 5 pool: 5
username: root username: root
password: password:
# host: localhost host: localhost
# socket: /tmp/mysql.sock # socket: /tmp/mysql.sock
prepared_statements: false prepared_statements: false
...@@ -6,10 +6,9 @@ production: ...@@ -6,10 +6,9 @@ production:
encoding: unicode encoding: unicode
database: gitlabhq_production database: gitlabhq_production
pool: 10 pool: 10
# username: git username: git
# password: password: "secure password"
# host: localhost host: localhost
# port: 5432
# #
# Development specific # Development specific
...@@ -20,8 +19,8 @@ development: ...@@ -20,8 +19,8 @@ development:
database: gitlabhq_development database: gitlabhq_development
pool: 5 pool: 5
username: postgres username: postgres
password: password: "secure password"
# host: localhost host: localhost
# #
# Staging specific # Staging specific
...@@ -30,10 +29,10 @@ staging: ...@@ -30,10 +29,10 @@ staging:
adapter: postgresql adapter: postgresql
encoding: unicode encoding: unicode
database: gitlabhq_staging database: gitlabhq_staging
pool: 5 pool: 10
username: postgres username: git
password: password: "secure password"
# host: localhost host: localhost
# Warning: The database defined as "test" will be erased and # Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake". # re-generated from your development database when you run "rake".
...@@ -45,5 +44,5 @@ test: &test ...@@ -45,5 +44,5 @@ test: &test
pool: 5 pool: 5
username: postgres username: postgres
password: password:
# host: localhost host: localhost
prepared_statements: false prepared_statements: false
...@@ -27,11 +27,9 @@ fi ...@@ -27,11 +27,9 @@ fi
cp config/database.yml.$GITLAB_DATABASE config/database.yml cp config/database.yml.$GITLAB_DATABASE config/database.yml
if [ "$GITLAB_DATABASE" = 'postgresql' ]; then 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 else # Assume it's mysql
sed -i 's/username:.*/username: root/g' config/database.yml sed -i 's/localhost/mysql/g' config/database.yml
sed -i 's/password:.*/password:/g' config/database.yml
sed -i 's/# host:.*/host: mysql/g' config/database.yml
fi fi
cp config/resque.yml.example config/resque.yml 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