corriendo y con "automatismo". Api levantada

This commit is contained in:
Your Name
2025-02-11 16:29:05 +01:00
parent 5a0833f3cf
commit 325276253b
8 changed files with 43 additions and 48 deletions

View File

@ -5,10 +5,15 @@ WORKDIR ./
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
RUN mkdir app
ENV PYTHONPATH=/app
COPY . ./app
# Asegúrate de que el script auto.sh sea ejecutable
RUN chmod +x /app/auto.sh
RUN ls
CMD ["uvicorn", "app.main:app","--reload", "--host", "0.0.0.0", "--port", "8000"]
# Ejecuta el script auto.sh al iniciar el contenedor, luego ejecuta uvicorn
CMD ["/bin/sh", "-c", "/app/auto.sh && uvicorn app.main:app --reload --host 0.0.0.0 --port 8000"]