feat(base): finalizada Fase 1 scaffolding v0.1.0-alpha
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
# ==============================================================================
|
||||
# Dockerfile para Backend FastAPI (OnEverControl)
|
||||
# Compatible con Linux x86_64 y ARM64
|
||||
# ==============================================================================
|
||||
FROM python:3.12-slim
|
||||
|
||||
# Evitar prompts interactivos y buffer de python
|
||||
ENV DEBIAN_FRONTEND=noninteractive \
|
||||
PYTHONUNBUFFERED=1 \
|
||||
PYTHONDONTWRITEBYTECODE=1
|
||||
|
||||
# Instalar dependencias del sistema requeridas por FreeTDS (pymssql)
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
freetds-dev \
|
||||
freetds-bin \
|
||||
build-essential \
|
||||
curl \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Configurar directorio de trabajo
|
||||
WORKDIR /app
|
||||
|
||||
# Copiar dependencias de Python e instalarlas
|
||||
COPY requirements.txt /app/
|
||||
RUN pip install --no-cache-dir --upgrade pip && \
|
||||
pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Copiar el código de la aplicación
|
||||
COPY app/ /app/app/
|
||||
|
||||
# Exponer el puerto de Uvicorn
|
||||
EXPOSE 8000
|
||||
|
||||
# Healthcheck interno de Docker
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \
|
||||
CMD curl -f http://localhost:8000/health || exit 1
|
||||
|
||||
# Comando por defecto
|
||||
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||
Reference in New Issue
Block a user