Skip to content

Latest commit

 

History

History
65 lines (43 loc) · 1.57 KB

README.md

File metadata and controls

65 lines (43 loc) · 1.57 KB

PostGIS

Container running PostgreSQL with the spatial extension PostGIS.

Usage with docker

  • Start postgis :
export POSTGRES_USER=postgis
export POSTGRES_PASSWORD=ChangeIt
docker compose up -d
  • Configure psql (~/.profile) :
export PGHOST=localhost
export PGUSER=postgis
export PGPASSWORD=ChangeIt
  • Create gis database
createdb gis
psql -d gis -c "CREATE EXTENSION postgis"

Usage with Kubernetes

Read k8s-install.sh and run :

bash k8s-install.sh

Note that :

  • Password is generated by bitnami's helm chart and stored in a secret named "gis-postgresql" :
export POSTGRES_PASSWORD=$(kubectl get secret --namespace postgis gis-postgresql -o jsonpath="{.data.postgres-password}" | base64 -d)
  • Internal hostname is gis-postgresql.postgis.svc.cluster.local
  • You can also use port-forwarding : kubectl port-forward --namespace postgis svc/gis-postgresql 15432:5432

See also

For Kubernetes :

To tune PostgreSQL :