Skip to content

Instantly share code, notes, and snippets.

@browniebroke
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save browniebroke/20857dedc61b0ace5676 to your computer and use it in GitHub Desktop.
Save browniebroke/20857dedc61b0ace5676 to your computer and use it in GitHub Desktop.
YAML Install postgres 9.1 with postgis on CircleCI
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