favicon
This commit is contained in:
+17
-7
@@ -1,19 +1,29 @@
|
|||||||
FROM python:3.13-slim
|
FROM python:3.14-alpine
|
||||||
|
|
||||||
ENV PYTHONDONTWRITEBYTECODE=1 \
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
||||||
PYTHONUNBUFFERED=1
|
PYTHONUNBUFFERED=1 \
|
||||||
|
PIP_NO_CACHE_DIR=1
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN apk add --no-cache \
|
||||||
build-essential curl \
|
curl \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
freetype \
|
||||||
|
libjpeg-turbo \
|
||||||
|
zlib \
|
||||||
|
&& apk add --no-cache --virtual .build-deps \
|
||||||
|
build-base \
|
||||||
|
freetype-dev \
|
||||||
|
libffi-dev \
|
||||||
|
libjpeg-turbo-dev \
|
||||||
|
zlib-dev
|
||||||
|
|
||||||
COPY requirements.txt .
|
COPY requirements.txt .
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
RUN pip install -r requirements.txt \
|
||||||
|
&& apk del .build-deps
|
||||||
|
|
||||||
COPY app ./app
|
COPY app ./app
|
||||||
RUN mkdir -p /app/exports
|
RUN mkdir -p /app/exports
|
||||||
|
|
||||||
EXPOSE 8000
|
EXPOSE 8147
|
||||||
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8147"]
|
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8147"]
|
||||||
|
|||||||
+4
-4
@@ -12,7 +12,7 @@ import httpx
|
|||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
from bs4 import BeautifulSoup
|
from bs4 import BeautifulSoup
|
||||||
from fastapi import FastAPI, WebSocket, WebSocketDisconnect, Response
|
from fastapi import FastAPI, WebSocket, WebSocketDisconnect, Response
|
||||||
from fastapi.responses import HTMLResponse, StreamingResponse, JSONResponse
|
from fastapi.responses import FileResponse, HTMLResponse, StreamingResponse, JSONResponse
|
||||||
from fastapi.staticfiles import StaticFiles
|
from fastapi.staticfiles import StaticFiles
|
||||||
from reportlab.lib import colors
|
from reportlab.lib import colors
|
||||||
from reportlab.lib.pagesizes import A4, landscape
|
from reportlab.lib.pagesizes import A4, landscape
|
||||||
@@ -68,9 +68,9 @@ async def no_cache_headers(request, call_next):
|
|||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
||||||
@app.get("/favicon.ico")
|
@app.get("/favicon.ico", include_in_schema=False)
|
||||||
def favicon() -> Response:
|
def favicon() -> FileResponse:
|
||||||
return Response(status_code=204)
|
return FileResponse(BASE_DIR / "static" / "favicon.ico", media_type="image/x-icon")
|
||||||
|
|
||||||
|
|
||||||
@app.get("/", response_class=HTMLResponse)
|
@app.get("/", response_class=HTMLResponse)
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
+6
-6
@@ -1,8 +1,8 @@
|
|||||||
fastapi==0.115.6
|
fastapi>=0.115.6
|
||||||
uvicorn[standard]==0.34.0
|
uvicorn[standard]>=0.34.0
|
||||||
pydantic>=2.10.4
|
pydantic>=2.10.4
|
||||||
httpx==0.28.1
|
httpx>=0.28.1
|
||||||
beautifulsoup4==4.12.3
|
beautifulsoup4>=4.12.3
|
||||||
reportlab==4.2.5
|
reportlab>=4.2.5
|
||||||
python-multipart==0.0.20
|
python-multipart>=0.0.20
|
||||||
openpyxl>=3.1.5
|
openpyxl>=3.1.5
|
||||||
Reference in New Issue
Block a user