Add new infra architecture 6

This commit is contained in:
Urtzi Alfaro
2026-01-19 16:31:11 +01:00
parent b78399da2c
commit 7d6845574c
58 changed files with 2360 additions and 492 deletions

View File

@@ -1,10 +1,28 @@
# Add this stage at the top of each service Dockerfile
FROM localhost:5000/python_3.11-slim AS shared
# =============================================================================
# Gateway Dockerfile - Environment-Configurable Base Images
# =============================================================================
# Build arguments for registry configuration:
# - BASE_REGISTRY: Registry URL (default: docker.io for Docker Hub)
# - PYTHON_IMAGE: Python image name and tag (default: python:3.11-slim)
#
# Usage:
# Dev: docker build --build-arg BASE_REGISTRY=localhost:5000 --build-arg PYTHON_IMAGE=python_3.11-slim .
# Prod: docker build --build-arg BASE_REGISTRY=ghcr.io/your-org --build-arg PYTHON_IMAGE=python:3.11-slim .
# =============================================================================
# Build arguments - can be overridden at build time
ARG BASE_REGISTRY=docker.io
ARG PYTHON_IMAGE=python:3.11-slim
# Stage 1: Copy shared libraries
FROM ${BASE_REGISTRY}/${PYTHON_IMAGE} AS shared
WORKDIR /shared
COPY shared/ /shared/
# Then your main service stage
FROM localhost:5000/python_3.11-slim
# Stage 2: Main service
ARG BASE_REGISTRY=docker.io
ARG PYTHON_IMAGE=python:3.11-slim
FROM ${BASE_REGISTRY}/${PYTHON_IMAGE}
# Create non-root user for security
RUN groupadd -r appgroup && useradd -r -g appgroup appuser