This commit is contained in:
Valeria Fadeeva 2025-07-10 02:54:49 +05:00
parent 0c80b25d68
commit 116ba791dc
2 changed files with 4 additions and 1 deletions

View File

@ -25,6 +25,7 @@ WORKDIR /app
# Copy requirements from build stage, and install them # Copy requirements from build stage, and install them
COPY --from=build /app/requirements.txt . COPY --from=build /app/requirements.txt .
RUN pip install --upgrade pip RUN pip install --upgrade pip
RUN pip install --no-cache-dir "fastapi[standard]"
RUN pip install --no-cache-dir -r requirements.txt RUN pip install --no-cache-dir -r requirements.txt
COPY . . COPY . .
@ -36,4 +37,6 @@ USER appuser
# Run server # Run server
EXPOSE 8001 EXPOSE 8001
# CMD ["gunicorn", "--bind", "0.0.0.0:8001", "main_package.app:app"] # CMD ["gunicorn", "--bind", "0.0.0.0:8001", "main_package.app:app"]
CMD ["uvicorn", "main_package.app:app", "--reload", "--host", "0.0.0.0", "--port", "8001", "--proxy-headers"] # CMD ["uvicorn", "main_package.app:app", "--reload", "--host", "0.0.0.0", "--port", "8001", "--proxy-headers"]
CMD ["fastapi", "run", "main_package/app.py", "--reload", "--port", "8001", "--proxy-headers"]

0
main_package/__init__.py Normal file
View File