first claude draft

This commit is contained in:
buenosairesam
2025-12-29 14:40:06 -03:00
commit 116d4032e2
69 changed files with 5020 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
# Multi-stage Dockerfile for Gateway service (FastAPI)
FROM python:3.11-slim as base
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
&& rm -rf /var/lib/apt/lists/*
COPY services/gateway/requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
COPY shared /app/shared
COPY proto /app/proto
RUN python -m grpc_tools.protoc \
-I/app/proto \
--python_out=/app/shared \
--grpc_python_out=/app/shared \
/app/proto/metrics.proto
COPY services/gateway /app/services/gateway
COPY web /app/web
ENV PYTHONPATH=/app
ENV PYTHONUNBUFFERED=1
# =============================================================================
FROM base as development
RUN pip install --no-cache-dir watchfiles
CMD ["uvicorn", "services.gateway.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]
# =============================================================================
FROM base as production
RUN useradd --create-home --shell /bin/bash appuser
USER appuser
EXPOSE 8000
CMD ["uvicorn", "services.gateway.main:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "2"]

View File

@@ -0,0 +1,13 @@
fastapi>=0.109.0
uvicorn[standard]>=0.27.0
grpcio>=1.60.0
grpcio-tools>=1.60.0
redis>=5.0.0
asyncpg>=0.29.0
websockets>=12.0
jinja2>=3.1.2
structlog>=23.2.0
python-json-logger>=2.0.7
pydantic>=2.5.0
pydantic-settings>=2.1.0
httpx>=0.26.0