From 5faf0b9487720fc4e7e1a9ea623d10220e47c4a9 Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Sun, 4 May 2025 21:10:41 +0200 Subject: [PATCH] Add Dockerfile for containerized deployment of the bot --- Dockerfile | 22 ++++++++++++++++++++++ pyproject.toml | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..da2a82a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim + +WORKDIR /app + +ENV UV_COMPILE_BYTECODE=1 +ENV UV_LINK_MODE=copy + +RUN --mount=type=cache,target=/root/.cache/uv \ + --mount=type=bind,source=uv.lock,target=uv.lock \ + --mount=type=bind,source=pyproject.toml,target=pyproject.toml \ + uv sync --frozen --no-install-project --no-dev + +ADD . /app + +RUN --mount=type=cache,target=/root/.cache/uv \ + uv sync --frozen --no-dev + +ENV PATH="/app/.venv/bin:$PATH" + +ENTRYPOINT [] + +CMD ["uv", "run", "python", "-m", "botbotbot"] diff --git a/pyproject.toml b/pyproject.toml index 0d9c9bb..48512cc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ dependencies = [ ] [project.scripts] -hasspy = "botbotbot:main" +botbotbot = "botbotbot:main" [dependency-groups] dev = [