Commit e2c3d426ac2044f7037a4c080b41c1d0e2a89522
1 parent
672c41b5
Exists in
master
and in
17 other branches
More GitLab, less ChefServer for DB setup
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
files/gitlab-cookbooks/gitlab/recipes/postgresql.rb
@@ -142,13 +142,13 @@ db_name = "gitlabhq_production" | @@ -142,13 +142,13 @@ db_name = "gitlabhq_production" | ||
142 | sql_user = node['gitlab']['postgresql']['sql_user'] | 142 | sql_user = node['gitlab']['postgresql']['sql_user'] |
143 | sql_user_passwd = node['gitlab']['postgresql']['sql_password'] | 143 | sql_user_passwd = node['gitlab']['postgresql']['sql_password'] |
144 | 144 | ||
145 | -execute "#{bin_dir}/psql --port #{pg_port} -d '#{db_name}' -c \"CREATE USER #{sql_user} WITH ENCRYPTED PASSWORD '#{sql_user_passwd}'\"" do | 145 | +execute "#{bin_dir}/psql --port #{pg_port} -d template1 -c \"CREATE USER #{sql_user} WITH ENCRYPTED PASSWORD '#{sql_user_passwd}'\"" do |
146 | user pg_user | 146 | user pg_user |
147 | not_if { !pg_helper.is_running? || pg_helper.sql_user_exists? } | 147 | not_if { !pg_helper.is_running? || pg_helper.sql_user_exists? } |
148 | end | 148 | end |
149 | 149 | ||
150 | execute "create #{db_name} database" do | 150 | execute "create #{db_name} database" do |
151 | - command "#{bin_dir}/createdb -T template0 --port #{pg_port} -E UTF-8 -O #{sql_user} #{db_name}" | 151 | + command "#{bin_dir}/createdb --port #{pg_port} -E UTF-8 -O #{sql_user} #{db_name}" |
152 | user pg_user | 152 | user pg_user |
153 | not_if { !pg_helper.is_running? || pg_helper.database_exists?(db_name) } | 153 | not_if { !pg_helper.is_running? || pg_helper.database_exists?(db_name) } |
154 | retries 30 | 154 | retries 30 |