From 98609fd2f7b3b799f09beb01210940d65cf2251c Mon Sep 17 00:00:00 2001 From: Ian Bicking Date: Fri, 12 Oct 2018 17:37:25 -0500 Subject: [PATCH] Fix Postgres installation in CircleCI (#5033) Something regressed the previous installation. This uses normal apt-get installation, and then fixes up the config to add necessary users and databases and change the authentication --- .circleci/config.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2af6edbaa2..cac0e523ab 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -42,7 +42,18 @@ jobs: at: . - run: name: Install Postgres - command: sudo circleci-install postgres + command: | + # sudo -u postgres doesn't like to run from the project directory: + cd ~ + sudo apt-get -q update + sudo apt-get install postgresql-9.3 postgresql-client-9.3 # sudo circleci-install postgres + # Create the database and user we use from tests: + sudo -u postgres createuser --user postgres ubuntu + sudo -u postgres createdb --user postgres circle_test + # This allows passwordless logins from localhost: + sudo sed -ri 's!127.0.0.1/32[ \t]+md5!127.0.0.1/32 trust!g' /etc/postgresql/9.3/main/pg_hba.conf + # Restart to see the login config change: + sudo /etc/init.d/postgresql restart - run: name: Start Server command: |