feat: conditional Keycloak via compose profile + Makefile probe

This commit is contained in:
Mike Kell 2025-06-13 12:33:26 +00:00
parent 36976a3876
commit 4a021a5711
2 changed files with 49 additions and 0 deletions

9
.env Normal file
View File

@ -0,0 +1,9 @@
# .env ──────────────────────────────────────────
# Values you want to override permanently
# If an external Keycloak exists, point here;
# leave empty to fall back to the embedded container.
KEYCLOAK_URL=https://kc.kellsupport.com
# Custom project name (avoids long folder names in ~/.local/share/containers)
COMPOSE_PROJECT_NAME=cmmc-platform

View File

@ -0,0 +1,40 @@
_format_version: "3.0"
_transform: true
#########################################################
# Upstream — FastAPI service running in podman-compose
#########################################################
services:
- name: fastapi-svc
host: fastapi # container alias on the internal network
port: 8000
protocol: http
routes:
# Public API
- name: api-root
paths: ["/api/"]
strip_path: true
methods: ["GET", "POST", "PUT", "PATCH", "DELETE"]
plugins:
# Enable CORS for local testing
- name: cors
config:
origins: ["*"]
methods: ["GET", "POST", "PUT", "PATCH", "DELETE"]
headers: ["Accept", "Content-Type", "Authorization"]
credentials: false
max_age: 3600
# Health probe exposed at /gateway-health
- name: gateway-health
paths: ["/gateway-health"]
strip_path: true
methods: ["GET"]
plugins:
# Global rate-limit (optional; remove if you dont need it yet)
- name: rate-limiting
config:
second: 25
policy: local