From 6f0afb3cc4ddb5e9eccbaa3a9da708f0df3eaaac Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Thu, 30 Jan 2014 18:15:18 +0100 Subject: [PATCH] Make UTF8 the default encoding for Postgres --- files/gitlab-cookbooks/gitlab/recipes/postgresql.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/gitlab-cookbooks/gitlab/recipes/postgresql.rb b/files/gitlab-cookbooks/gitlab/recipes/postgresql.rb index a375a8d..f70b3dd 100644 --- a/files/gitlab-cookbooks/gitlab/recipes/postgresql.rb +++ b/files/gitlab-cookbooks/gitlab/recipes/postgresql.rb @@ -86,7 +86,7 @@ else end end -execute "/opt/gitlab/embedded/bin/initdb -D #{postgresql_data_dir}" do +execute "/opt/gitlab/embedded/bin/initdb -D #{postgresql_data_dir} -E UTF8" do user node['gitlab']['postgresql']['username'] not_if { File.exists?(File.join(postgresql_data_dir, "PG_VERSION")) } end @@ -148,7 +148,7 @@ execute "#{bin_dir}/psql --port #{pg_port} -d template1 -c \"CREATE USER #{sql_u end execute "create #{db_name} database" do - command "#{bin_dir}/createdb --port #{pg_port} -E UTF-8 -O #{sql_user} #{db_name}" + command "#{bin_dir}/createdb --port #{pg_port} -O #{sql_user} #{db_name}" user pg_user not_if { !pg_helper.is_running? || pg_helper.database_exists?(db_name) } retries 30 -- libgit2 0.21.2