ORF Archiv DB is a utility package used for local development and backups. It contains a simple docker-compose file to quickly start a local MongoDB instance. Additionally, it also starts a mongo-express server to inspect your MongoDB with a web UI.
The backup script can connect to any MongoDB server and export all news content to the specified backup directory. The following environment variables are available:
- ORFARCHIV_DB_URL
- ORFARCHIV_BACKUP_DIR
- ORFARCHIV_CONTENT_EMBEDDING_EXCLUDED_TARGETS: target labels separated by
;(e.g. the Atlas M0<cluster>.mongodb.net) that never hold content embeddings.setupcreates theirnews_title_vectorindex without thecontentEmbeddingpath and without thecontent_status_timestampindex,syncdoesn't copycontentEmbeddingandcontentStatusto them, andverifyfails if they contain either field.targetsshows each target's capability. If unset, it falls back to empty and every target gets content. The checked-in.envexcludesorfarchiv-db-2.
This repository contains git submodules. Clone it with git clone --recursive or run
git submodule update --init --recursive in an existing clone.
- docker-compose up -d
- Visit http://localhost:3002
- Create orfarchiv database
- Create news collection in the orfarchiv database
- Create an index for id (unique) and timestamp (descending order) field
- Optionally: create .env.local (copy from .env file) and configure ORFARCHIV_DB_URL environment variable if your MongoDB is not running on mongodb://localhost:27017
npm installnpm start