Skip to content

RISE-Maritime/chihuahua

Repository files navigation

drawing

Chihuahua

A very small guard dog ... and a minimalist authentication server designed to work with Traefik forward auth

Development

Requires:

  • python >= 3.11
  • docker and docker-compose

Setup

  1. Install the python requirements in a virtual environment:
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt -r requirements_dev.txt

# with Conda
conda create -n cn-auth python=3.8
conda activate cn-auth
pip install -r requirements.txt -r requirements_dev.txt
  1. In different terminal windows:

    a. Start Traefik and dummy services for development:

    docker-compose -f docker-compose.dev.yml up
    

    b. Start the Chihuahua server:

    export $(xargs < .env.dev)
    uvicorn chihuahua.main:app --reload --port 8000

The API's documentation is available at http://localhost/auth/api/docs

Run testsuite

For the tests to run successfully, Traefik, the dummy services, and the Chihuahua server must be running as described above.

pytest tests/