Skip to content

Hochfrequenz/fristenkalender-functions

Repository files navigation

fristenkalender-functions

This repository provides an HTTP API that exposes the features of fristenkalender_generator and bdew-datetimes as a REST API. It's used by the fristenkalender-frontend which is deployed to fristenkalender.hochfrequenz.de.

The actual business logic for BDEW calendar calculations (working days, holidays, deadlines) is implemented in the upstream packages: fristenkalender_generator by Hochfrequenz and bdew-datetimes by mj0nez.

Docker Image

A pre-built Docker image is publicly available on the GitHub Container Registry:

docker pull ghcr.io/hochfrequenz/fristenkalender-functions:latest
docker run -p 8000:80 ghcr.io/hochfrequenz/fristenkalender-functions:latest

API Documentation

The API documentation is available at the /docs endpoint (OpenAPI/Swagger UI).

Local Setup

Install the dependencies and run the application:

pip install .
fastapi dev src/app/main.py

Then open http://localhost:8000/docs to view the API documentation.

CI/CD

When you publish a new release in GitHub, the deploy-azure.yml workflow automatically:

  1. Builds the Docker image
  2. Pushes it to Azure Container Registry
  3. Deploys to Azure Container Apps

Another workflow automatically builds a Docker image and pushes it to GHCR. This image on GHCR is used e.g. by the frontend for its integration tests.

Azure Resources

We only run 1 instance, the production environment: Azure Portal fristenkalender-api Container App (in the hochfrequenz.de tenant).

About

Backend of Hochfrequenz Fristenkalender / FastAPI to expose Fristenkalender Logic

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors