Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
Fix Postgres installation in CircleCI (#5033)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ianb authored and jaredhirsch committed Oct 12, 2018
1 parent 9abf0d3 commit 98609fd
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .circleci/config.yml
Expand Up @@ -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: |
Expand Down

0 comments on commit 98609fd

Please sign in to comment.