feat(dev): external Keycloak detection, scoped services, pytest compatibility

This commit is contained in:
Mike Kell 2025-06-13 13:06:21 +00:00
parent 4a021a5711
commit 74a34f453a
1 changed files with 16 additions and 3 deletions

View File

@ -1,6 +1,16 @@
# Root Makefile for CMMC-Platform local dev
############################################################
# Load .env into Make's environment (must be first!)
############################################################
ifneq (,$(wildcard .env))
include .env
export $(shell sed -E 's/#.*//' .env | cut -d= -f1)
endif
# ───────────── rest of your Makefile below ─────────────
compose = podman-compose -f dev-compose.yaml
#
# ----------------------------------------------------------
# Helpers
@ -11,9 +21,12 @@ create-proxy-net:
# probe external Keycloak once and cache the flag
check-idp:
@echo "🔍 Probing $(KEYCLOAK_URL) for existing Keycloak..."
@if curl -sf "${KEYCLOAK_URL:-http://keycloak.local:8080}/realms/master" >/dev/null ; \
then echo "🥳 External Keycloak detected!"; echo 1 >.idp_flag ; \
else echo "🛠 No external Keycloak found."; echo 0 >.idp_flag ; fi
@if curl -skL --max-time 5 "$${KEYCLOAK_URL:-http://keycloak.local:8080}/realms/master" >/dev/null ; then \
echo "🥳 External Keycloak detected!"; echo 1 >.idp_flag ; \
else \
echo "🛠 No external Keycloak found."; echo 0 >.idp_flag ; \
fi
# ----------------------------------------------------------
# Lifecycle targets