diff --git a/docs/MANUAL_SETUP.md b/docs/MANUAL_SETUP.md index 3dce41c9b..30291e209 100644 --- a/docs/MANUAL_SETUP.md +++ b/docs/MANUAL_SETUP.md @@ -236,6 +236,27 @@ Executing `make docker-build-dev` followed by `make docker-run-dev` will build a #### Natively +As of Nov 2024 the version of postgis installed with brew doesn't work with postgresql@16. postgis is specifically +linked to the original postgres cask (aka postgres@14). If you choose to use postgresql@16 installed via brew, you +will need to compile postgis yourself. The alternative is to use [Postgres.app](https://postgresapp.com/). + +After installing Postgres.app, run the following commands in a terminal (taken from the mac.sh setup script): + +```bash +psql -d postgres -c "create database wps;" +psql -d wps -c "create extension postgis;" +psql -d wps -c " +CREATE USER wps; +CREATE USER wpsread; +ALTER USER wps WITH LOGIN; +ALTER USER wpsread WITH LOGIN; +ALTER USER wps WITH SUPERUSER; +grant connect on database wps to wpsread; grant usage on schema public to wpsread; grant select on all tables in schema public to wpsread; +" +``` + +If you have chosen to `brew install postgresql@16` and compile `postgis` locally, follow the instructions below: + If you're running Postgresql natively for the first time: ```bash diff --git a/setup/mac.sh b/setup/mac.sh index a518438f6..994f8d6f0 100755 --- a/setup/mac.sh +++ b/setup/mac.sh @@ -39,22 +39,22 @@ r -e 'install.packages(c("rgdal","sf", "units"),,"https://mac.R-project.org")' r -e "install.packages('cffdrs', repos = 'http://cran.us.r-project.org')" echo "finished installing r packages" -### postgres -echo "installing and configuring postgres" -brew install postgresql -brew services start postgresql -brew install postgis -psql -d postgres -c "create database wps;" -psql -d wps -c "create extension postgis;" -psql -d wps -c " -CREATE USER wps; -CREATE USER wpsread; -ALTER USER wps WITH LOGIN; -ALTER USER wpsread WITH LOGIN; -ALTER USER wps WITH SUPERUSER; -grant connect on database wps to wpsread; grant usage on schema public to wpsread; grant select on all tables in schema public to wpsread; -" -echo "finished installing and configuration postgres, run migrations in poetry shell" +### postgres - Nov 2024 - Commenting out the postgres setup. See MANUAL.md for reasons and manual postgres setup. +# echo "installing and configuring postgres" +# brew install postgresql +# brew services start postgresql +# brew install postgis +# psql -d postgres -c "create database wps;" +# psql -d wps -c "create extension postgis;" +# psql -d wps -c " +# CREATE USER wps; +# CREATE USER wpsread; +# ALTER USER wps WITH LOGIN; +# ALTER USER wpsread WITH LOGIN; +# ALTER USER wps WITH SUPERUSER; +# grant connect on database wps to wpsread; grant usage on schema public to wpsread; grant select on all tables in schema public to wpsread; +# " +# echo "finished installing and configuration postgres, run migrations in poetry shell" ### redis brew install redis