Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to use Postgres 9.6.1 on circleci 14.04 image
# Other settings have been omitted, the below changes are relevant
machine:
pre:
- sudo service postgresql stop
- sudo apt-get purge -y postgresql*
- sudo apt-get update
- sudo apt-get install postgresql
- sudo service postgresql start
- sudo su - postgres -c "echo \"create user ubuntu with password 'ubuntu';\" | psql"
- sudo su - postgres -c "echo \"alter user ubuntu with superuser;\" | psql"
- sudo su - postgres -c "echo \"create database ubuntu;\" | psql"
database:
override:
- mv config/database.ci.yml config/database.yml
- bundle exec rake db:create db:structure:load --trace
# config/database.ci.yml
test:
adapter: postgresql
database: circle_ruby_test
username: ubuntu
password: ubuntu
encoding: unicode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.