Files
endpoin/Dockerfile
2025-12-23 16:54:07 +00:00

30 lines
733 B
Docker

FROM python:3.11-slim
WORKDIR /code
# Instalar dependencias del sistema
RUN apt-get update && apt-get install -y \
gcc \
postgresql-client \
&& 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 el código de la aplicación
COPY ./app /code/app
COPY ./alembic /code/alembic
COPY ./alembic.ini /code/alembic.ini
COPY ./migrate.sh /code/migrate.sh
RUN sed -i 's/\r$//' /code/migrate.sh && chmod +x /code/migrate.sh
# Exponer el puerto
EXPOSE 8009
# Comando para ejecutar la aplicación
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8009", "--reload"]