Per-Job Images
One distinct Docker image per background job. Each image installs only its own
dependencies and bakes the job's command as its ENTRYPOINT, so a job runs with
no command override in the database — the job definition just points image at
the matching tag.
This is deliberately different from the single shared-image model described in background-jobs/README.md: here every job is self-contained, at the cost of maintaining one Dockerfile per job.
Images
| Job (DB name) | Image | Entrypoint | Notes |
|---|---|---|---|
| News-Crawler | jobs/news-crawl |
run_pipeline.py |
scrapy<2.13, Twisted<24.7; uploads to NEWS_UPLOAD_INDEX |
| Bund-Crawler | jobs/bund-crawl |
gpc.data.py --max-rows 200 |
headless Chrome; uploads to BUND_UPLOAD_INDEX; capped, full export is ~300k rows |
| Projekt-Themen-Mapping | jobs/project-topics |
map_project_topics --output-index docker-job_test |
reads projects_bund_v1; needs host backend |
| News-Themen-Mapping | jobs/news-topics |
map_news_topics --output-index docker-job_test |
bundles both topic_mapper pkgs; needs host backend |
| News-Schlagwort-Extraktion | jobs/news-keywords |
sync.py --update-keywords --target-index docker-job_test |
ES + LLM creds; writes to test index |
| Demo-Job A / B / C | jobs/demo-a/b/c |
demo.py 20 / 25 / 30 |
no dependencies |
Each job is its own repository under the jobs/ path namespace, prefixed
docker.nes.uni-due.de/inse/ (e.g. docker.nes.uni-due.de/inse/jobs/news-crawl:latest).
The entrypoints carry no run limits: anything set in the job's command field is
appended to the entrypoint, so limits (--max-items, --max-docs, --limit) are
passed per run from the UI. The one exception is the Bund-Crawler, which keeps a
--max-rows cap in the image because its full export is ~300k rows.
Build
From the repo root (the build context must be the repo root so the Dockerfiles
can copy service/scripts/… and background-jobs/app/):
docker build -f service/scripts/jobs-image/news-crawl/Dockerfile \
-t docker.nes.uni-due.de/inse/jobs/news-crawl:latest .
docker push docker.nes.uni-due.de/inse/jobs/news-crawl:latest
Each job's Dockerfile header lists its own build command.
Running locally without pushing
The backend tries to pull each image before a run. If the image isn't in the registry, the pull fails softly and the local copy is used — so building locally is enough for local runs. To skip the pull attempt entirely:
export BACKGROUND_JOBS_PULL_BEFORE_RUN=false
Env vars
Because every tag lives under the docker.nes.uni-due.de registry host, the
backend treats these as registry images and injects the INSE Elasticsearch / LLM
credentials automatically (plus any per-job env).
No image writes to a production index by default: the crawlers upload into the
index named by NEWS_UPLOAD_INDEX / BUND_UPLOAD_INDEX (both baked to
docker-job_test in their Dockerfile), and the mappers and the keyword
extraction write to docker-job_test via --output-index / --target-index.
To not contact Elasticsearch at all, pass --skip-upload (crawlers) or
--dry-run (mappers) through the job's command field.