Skip to content

opensafely-core/job-server

Repository files navigation

OpenSAFELY Job Server

This is the Web UI for requesting Jobs are run within the OpenSAFELY platform, and viewing their logs.

It provides an API to job-runner which executes those Jobs in high-security environments.

Stack

This is a Django project. It uses Django Rest Framework for the API and PostgreSQL for the database. It is deployed via dokku, serves static files using the whitenoise package, and is itself served by gunicorn. We authenticate Users with the Python Social Auth Django-specific package, using GitHub as the OAuth Provider backend.

Tests are run with pytest and a selection of plug-ins.

We use black and isort to automatically format the codebase, with flake8 for linting. Each tool, including pytest, has been configured via config files, but a Makefile also exists to script common use cases (eg check and fix formatting). pre-commit is configured to run the same checks via git hooks.

Frontend assets are managed in Node.js using npm and Vite.

CI is handled by GitHub Actions where the tests and tooling are run. After a successful merge to main a deployment is run.

Errors are logged to the Bennett Institute Sentry account.

Developer docs

Please see the additional information.