lightweight APIS-PMB instance to generate TEI/XML dumps
maybe in future also with PMB CRUD included
- clone the repo
- create a virtual env
python -m venv venv - activate it
source venv/bin/activate - install packages
pip install -r requirements_dev.txt - get a recent db-dump (
./dump_and_restore.sh) (create a postgres-dbpmband run./dump_and_restore.sh, make sure you tunneled to production db first) - set env variables
- run
python manage.py runserver - (create a superuser)
python manage.py creatsuperuser
pip install notebook(1 time)- set env varibles
./set_env_variables python manage.py shell_plus --lab
python manage.py process_beacon --beacon=https://thun-korrespondenz.acdh.oeaw.ac.at/beacon.txt --domain=thun-korrespondenz
python manage.py process_beacon --beacon=https://raw.githubusercontent.com/Auden-Musulin-Papers/amp-entities/main/out/beacon.txt --domain=Auden-Musulin-Papers
python manage.py process_beacon --beacon=https://raw.githubusercontent.com/Hanslick-Online/hsl-entities/main/out/beacon.txt --domain=Hanslick
python manage.py update_schnitzler_uris
python manage.py update_schnitzler_uris --url "https://raw.githubusercontent.com/arthur-schnitzler/schnitzler-kultur/refs/heads/main/csv/uris-in-use.csv"in order to avoid errors on a new instance you'll need to set an environment variable PMB_NEW=whatever. After you run the inital python manage.py migrate you should unset PMB_NEW
- bundling js-code (used for network-vis) is not part of the docker-setup
- for development make sure the vite-dev-server is running
pnpm run vite - for building new bundle, run
pn run build
BEGIN;
SELECT setval(pg_get_serial_sequence('"django_migrations"','id'), coalesce(max("id"), 1), max("id") IS NOT null) FROM "django_migrations";
COMMIT;docker build -t pmb:latest .docker build -t pmb:latest --no-cache .
To run the image you should provide an .env file to pass in needed environment variables; see pmb/settings.py for possible varibles:
docker run -it --network="host" --rm --env-file .env pmb:latest