Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

ORF Archiv DB

GitHub Actions Workflow Status GitHub package.json version GitHub License

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. setup creates their news_title_vector index without the contentEmbedding path and without the content_status_timestamp index, sync doesn't copy contentEmbedding and contentStatus to them, and verify fails if they contain either field. targets shows each target's capability. If unset, it falls back to empty and every target gets content. The checked-in .env excludes orfarchiv-db-2.

Setup

This repository contains git submodules. Clone it with git clone --recursive or run git submodule update --init --recursive in an existing clone.

Run

  1. docker-compose up -d
  2. Visit http://localhost:3002
  3. Create orfarchiv database
  4. Create news collection in the orfarchiv database
  5. Create an index for id (unique) and timestamp (descending order) field

Run backup

  1. 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
  2. npm install
  3. npm start

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages