From: zdk Date: Fri, 3 Oct 2014 11:17:10 +0000 (+0700) Subject: FIX: Install pg extention in the template1 database to avoid giving user superuser... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=2cac1e10d94bebfd9c6b5e40f09525bcef6057de;p=discourse_docker.git FIX: Install pg extention in the template1 database to avoid giving user superuser permissions, so db:migrate won't be failed. --- diff --git a/templates/postgres.template.yml b/templates/postgres.template.yml index a54d672..565668a 100644 --- a/templates/postgres.template.yml +++ b/templates/postgres.template.yml @@ -166,6 +166,8 @@ run: - exec: su postgres -c 'psql discourse -c "create user discourse;"' || true - exec: su postgres -c 'psql discourse -c "grant all privileges on database discourse to discourse;"' || true - exec: su postgres -c 'psql discourse -c "alter schema public owner to discourse;"' + - exec: su postgres -c 'psql template1 -c "create extension hstore;"' + - exec: su postgres -c 'psql template1 -c "create extension pg_trgm;"' - exec: su postgres -c 'psql discourse -c "create extension if not exists hstore;"' - exec: su postgres -c 'psql discourse -c "create extension if not exists pg_trgm;"'