Created
December 29, 2016 19:34
-
-
Save jnwheeler44/220a77ce680431a625878e9da0de1b0e to your computer and use it in GitHub Desktop.
How to use Postgres 9.6.1 on circleci 14.04 image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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