feat: docker

This commit is contained in:
katamaz committed 2026-10-02 21:13:32 +03:00
1 parent 86d660acba
commit f1a26d80a8
4 files changed
+47 -1

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
FROM ghcr.io/astral-sh/uv:python3.14-bookworm-slim
WORKDIR /app
# Force uv to use the system Python instead of downloading its own
ENV UV_PYTHON_DOWNLOADS=never \
UV_COMPILE_BYTECODE=1 \
UV_LINK_MODE=copy \
PYTHONUNBUFFERED=1
# Install locked dependencies first so code changes don't invalidate this layer
COPY pyproject.toml uv.lock ./
RUN uv sync --frozen --no-dev
# Then copy the application itself
COPY main.py formater.py image.py ./
COPY assets ./assets
# Put the venv on PATH so `python` resolves to the venv interpreter
ENV PATH="/app/.venv/bin:$PATH"
CMD ["python", "main.py"]