wget https://download.geofabrik.de/australia-oceania/papua-new-guinea-latest.osm.pbf
git clone git://github.com/gravitystorm/openstreetmap-carto.git --depth 1
| # Create and Enter your venv (if not already done) | |
| python -m venv env | |
| . env/bin/activate | |
| # Install playwright | |
| pip install playwright | |
| # Install the chromium browser runner |
This runs on a restored dird_db from a Docker container, postgis:postgis/14-3.2; I run this as docker run -P ghcr.io/joshbrooks/openly_dird_prod
Pervious versions of postgis run into trouble on the topology building
First create the SimplifyEdgeGeom function: (https://gist.github.com/leplatrem/5729022)
This wraps ST_ChangeEdgeGeom in error handling in cases of ugliness
| ## apt installs: | |
| git | |
| gcc | |
| pkg-config | |
| ## Install pyenv | |
| Following [pyenv-installer](https://github.com/pyenv/pyenv-installer) |
| SERVER=partisipa-staging.catalpa.build | |
| DATABASE=partisipa_db | |
| ssh_server := ssh root@${SERVER} | |
| fetchdatabase : | |
| $(ssh_server) rm -rf /tmp/pg_data_$(shell date -I)_$(shell hostname) | |
| $(ssh_server) pg_dump --compress=0 --format=directory postgresql:///$(DATABASE) -f /tmp/pg_data_$(shell date -I)_$(shell hostname) | |
| rsync --archive --compress --del root@${SERVER}:/tmp/pg_data_$(shell date -I)_$(shell hostname)/ ./source/ || true | |
| $(ssh_server) rm -rf /tmp/pg_data_$(shell date -I)_$(shell hostname) |
Welcome to Tutorial Tuesday 🎉
This is a quick intro to running a database dump made using pg_basebackup with Docker. It's intended audience is developers who are interested in exploring a database from a server, perhaps for development, debugging or forensics.
It covers:
pg_basebackup