Last active
August 29, 2015 14:16
-
-
Save browniebroke/20857dedc61b0ace5676 to your computer and use it in GitHub Desktop.
YAML Install postgres 9.1 with postgis on CircleCI
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
database: | |
# Use postgres 9.1 | |
pre: | |
- sudo service postgresql stop && sudo apt-get remove -y postgresql-9.3 && sudo apt-get update && sudo apt-get install -y postgresql-9.1 postgresql-contrib-9.1 postgresql-9.1-postgis-2.1 | |
- sudo sed -i "s/\port = 5433/port = 5432/" /etc/postgresql/9.1/main/postgresql.conf | |
- sudo cp /etc/postgresql/9.3/main/pg_hba.conf /etc/postgresql/9.1/main/pg_hba.conf | |
- sudo service postgresql restart | |
- sudo -u postgres createuser ubuntu -d --superuser | |
- createdb circle_test | |
# Activate postgis | |
post: | |
- psql -c "CREATE EXTENSION postgis;" -d circle_test | |
- psql -c "CREATE EXTENSION postgis_topology;" -d circle_test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment