chore: replace static secrets in Keycloak realm with env vars, update Dockerfile for non-root optimization, and align .env.example with new configuration
Build and Publish Docker Images / build-and-push (., backend/infrastructure/gateway/Dockerfile, api-gateway, api-gateway) (push) Successful in 7m23s
Build and Publish Docker Images / build-and-push (., backend/services/ping/Dockerfile, ping-service, ping-service) (push) Successful in 7m36s
Build and Publish Docker Images / build-and-push (., config/docker/caddy/web-app/Dockerfile, web-app, web-app) (push) Successful in 1m56s
Build and Publish Docker Images / build-and-push (., config/docker/keycloak/Dockerfile, keycloak, keycloak) (push) Failing after 38s
Build and Publish Docker Images / build-and-push (., backend/infrastructure/gateway/Dockerfile, api-gateway, api-gateway) (push) Successful in 7m23s
Build and Publish Docker Images / build-and-push (., backend/services/ping/Dockerfile, ping-service, ping-service) (push) Successful in 7m36s
Build and Publish Docker Images / build-and-push (., config/docker/caddy/web-app/Dockerfile, web-app, web-app) (push) Successful in 1m56s
Build and Publish Docker Images / build-and-push (., config/docker/keycloak/Dockerfile, keycloak, keycloak) (push) Failing after 38s
This commit is contained in:
@@ -1,36 +1,32 @@
|
||||
# ===================================================================
|
||||
# Production-Ready Keycloak Dockerfile
|
||||
# ===================================================================
|
||||
# Based on: quay.io/keycloak/keycloak:26.5.5
|
||||
# Based on: quay.io/keycloak/keycloak:<KEYCLOAK_IMAGE_TAG>
|
||||
# Features:
|
||||
# - Pre-built optimized image (faster startup)
|
||||
# - Security hardening
|
||||
# - Health monitoring
|
||||
# - Pre-built optimized image (faster startup via --optimized)
|
||||
# - Security hardening (non-root user 1000)
|
||||
# - Health & Metrics endpoints enabled
|
||||
# ===================================================================
|
||||
ARG KEYCLOAK_IMAGE_TAG=26.5.5
|
||||
|
||||
FROM quay.io/keycloak/keycloak:${KEYCLOAK_IMAGE_TAG}
|
||||
|
||||
ARG KEYCLOAK_IMAGE_TAG=26.5.5
|
||||
|
||||
LABEL maintainer="Meldestelle Development Team"
|
||||
LABEL description="Production-ready Keycloak for Meldestelle authentication"
|
||||
LABEL version="${KEYCLOAK_IMAGE_TAG}"
|
||||
|
||||
# Set environment variables for build
|
||||
# Set environment variables for build-time optimisation
|
||||
ENV KC_HEALTH_ENABLED=true
|
||||
ENV KC_METRICS_ENABLED=true
|
||||
ENV KC_DB=postgres
|
||||
|
||||
WORKDIR /opt/keycloak
|
||||
|
||||
# Pre-build Keycloak for faster startup
|
||||
# Pre-build Keycloak for faster startup (--optimized flag in KC_COMMAND)
|
||||
RUN /opt/keycloak/bin/kc.sh build \
|
||||
--db=postgres \
|
||||
--health-enabled=true \
|
||||
--metrics-enabled=true
|
||||
|
||||
# Set user
|
||||
# Run as non-root user
|
||||
USER 1000
|
||||
|
||||
ENTRYPOINT ["/opt/keycloak/bin/kc.sh"]
|
||||
|
||||
Reference in New Issue
Block a user