1
0
Fork 0
This commit is contained in:
Arthur K. 2026-04-13 13:54:46 +03:00
commit a8e86eaaa3
Signed by: wzray
GPG key ID: B97F30FDC4636357
6 changed files with 1008 additions and 0 deletions

23
Dockerfile Normal file
View file

@ -0,0 +1,23 @@
FROM python:3.14-alpine
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
EDGING_LOG_LEVEL=INFO \
PATH="/app/.venv/bin:$PATH"
WORKDIR /app
RUN apk add --no-cache ffmpeg && pip install uv
COPY pyproject.toml uv.lock .
RUN uv sync --frozen --no-dev
COPY src .
EXPOSE 80
HEALTHCHECK --start-interval=1s --start-period=10s \
CMD python -c "import json, urllib.request; data = urllib.request.urlopen('http://127.0.0.1:80/models', timeout=3).read(); payload = json.loads(data); raise SystemExit(0 if payload == {'data': []} else 1)"
CMD ["uvicorn", "edging.main:app", "--host", "0.0.0.0", "--port", "80"]