Basic Setup for a FastAPI deployment protected by Keycloak
Follow these steps in sequence; each component has its own detailed README you must follow before starting:
-
Frontproxy
- cd frontproxy
- Copy and edit environment file:
cp example-env .envthen set your domain, certs and service URLs docker-compose up -d
-
Keycloak
- cd keycloak
- Copy and edit environment file:
cp example-env .envthen set DB and admin credentials docker-compose up -d
-
FastAPI
- cd fastapi
- Copy and edit environment file:
cp example-env .envthen set Keycloak URL, realm, client ID/secret uvicorn src.app.main:app --reload --host 0.0.0.0 --port 8000
Warning
Make sure to review and complete the individual README.md in each directory for prerequisites and detailed configuration before running these commands.