Fix Docker installation startup
This commit is contained in:
@@ -18,10 +18,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
WORKDIR /build
|
||||
|
||||
COPY pyproject.toml ./
|
||||
RUN pip install --prefix=/install uvicorn fastapi pydantic pydantic-settings \
|
||||
httpx sqlalchemy asyncpg beautifulsoup4 selectolax trafilatura structlog
|
||||
|
||||
COPY README.md ./
|
||||
COPY src/ ./src/
|
||||
RUN pip install --prefix=/install .
|
||||
|
||||
# ---------- Runtime stage ----------
|
||||
FROM python:3.12-slim AS runtime
|
||||
@@ -43,7 +42,6 @@ RUN mkdir -p /app/data && chown -R nsct:nsct /app/data
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder /install /usr/local
|
||||
COPY src/ ./src/
|
||||
|
||||
RUN chown -R nsct:nsct /app
|
||||
|
||||
@@ -51,4 +49,4 @@ USER nsct
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
CMD ["uvicorn", "nsct.api.main:app", "--host", "0.0.0.0", "--port", "8080"]
|
||||
CMD ["uvicorn", "nsct.api.main:app", "--host", "0.0.0.0", "--port", "8080"]
|
||||
|
||||
Reference in New Issue
Block a user