fastapi-mariadb / Dockerfile
Moibe's picture
Dockerizado
077e709
raw
history blame contribute delete
513 Bytes
FROM python:3.11-slim
WORKDIR /app
# Instalar dependencias del sistema
RUN apt-get update && apt-get install -y \
gcc \
&& rm -rf /var/lib/apt/lists/*
# Copiar requirements
COPY requirements.txt .
# Instalar dependencias de Python
RUN pip install --no-cache-dir -r requirements.txt
# Copiar c贸digo de la aplicaci贸n
COPY . .
# Exponer puerto (Hugging Face Spaces usa 7860)
EXPOSE 7860
# Comando para ejecutar la aplicaci贸n
CMD ["fastapi", "run", "main.py", "--host", "0.0.0.0", "--port", "7860"]