-
-
Save cmhobbs/a25b31b18dade3d54443 to your computer and use it in GitHub Desktop.
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
core: &core | |
adapter: postgis | |
encoding: unicode | |
host: 127.0.0.1 | |
username: postgres | |
database: magnum<%= ENV['CI_BUILD_NUMBER'] %> | |
development: | |
<<: *core | |
test: | |
<<: *core | |
staging: | |
<<: *core | |
production: | |
<<: *core |
Note that magnum-ci will always try to run bundle exec rake db:create
and it will always fail. I'm trying to find ways to get rid of that step in their configuration.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
install our own postgres and postgis
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
sudo apt-get update -y
sudo apt-get install postgresql-9.3-postgis-2.1 postgresql-9.3 postgresql-server-dev-9.3 -y
sudo ldconfig
sudo service postgresql start
create and extend the db
psql -c "create database magnum$CI_BUILD_NUMBER;" -U postgres
psql -c "CREATE EXTENSION postgis; CREATE EXTENSION postgis_topology;" magnum$CI_BUILD_NUMBER
grab this database.yml
curl -o config/database.yml 'https://gist.githubusercontent.com/cmhobbs/a25b31b18dade3d54443/raw/fd0411c8dbd36e7e434af974b29ec3e1a5a5ac58/database.yml'