Collects live statistics about occupied parking lots in Dortmund's parking garages from the official Open Data API. Parking statistics are stored in a postgres database.
-
Create an
.env
file with variables used by postgres and collector containers:POSTGRES_USER=<name> POSTGRES_PASSWORD=<password> CONNECTION_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432 DATABASE_NAME=do_parking DATABASE_URL=${CONNECTION_URL}/${DATABASE_NAME}
-
Create and start the docker containers. Required databases and tables are created automatically.
docker compose up -d
-
Create backup
docker exec -t do-parking-stats-db-1 pg_dumpall -c -U db_user > dump_`date +%Y-%m-%d"_"%H_%M_%S`.sql
-
Restore from backup (drops and replaces all data!)
cat dump_<date>.sql | docker exec -i do-parking-stats-db-1 psql -U db_user