diff options
author | Rémy Coutable <remy@rymai.me> | 2017-10-18 07:20:00 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-10-18 07:20:00 +0000 |
commit | 1090514ab407b7faa894cbd9b6cd769c376a9b5d (patch) | |
tree | 598bbbac27d399daa44983d00163e723f78081a1 | |
parent | b3f749036ea919de3982c81b157ab2d790ecb4c5 (diff) | |
parent | c17570d3b36452e47229d4fa282af75ecc08b690 (diff) | |
download | gitlab-ce-1090514ab407b7faa894cbd9b6cd769c376a9b5d.tar.gz |
Merge branch 'improve-database-yml-examples' into 'master'
Improve database yml examples
See merge request gitlab-org/gitlab-ce!10247
-rw-r--r-- | config/database.yml.mysql | 21 | ||||
-rw-r--r-- | config/database.yml.postgresql | 21 | ||||
-rw-r--r-- | scripts/prepare_build.sh | 6 |
3 files changed, 30 insertions, 18 deletions
diff --git a/config/database.yml.mysql b/config/database.yml.mysql index eb71d3f5fe1..98c2abe9f5e 100644 --- a/config/database.yml.mysql +++ b/config/database.yml.mysql @@ -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 diff --git a/config/database.yml.postgresql b/config/database.yml.postgresql index 4b30982fe82..baded682e46 100644 --- a/config/database.yml.postgresql +++ b/config/database.yml.postgresql @@ -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 diff --git a/scripts/prepare_build.sh b/scripts/prepare_build.sh index 39806901274..7abadef5e89 100644 --- a/scripts/prepare_build.sh +++ b/scripts/prepare_build.sh @@ -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 |