Add Dockerfile for containerized deployment of the bot

This commit is contained in:
Edgar P. Burkhart 2025-05-04 21:10:41 +02:00
parent 5e75dd73a8
commit 5faf0b9487
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
2 changed files with 23 additions and 1 deletions

22
Dockerfile Normal file
View file

@ -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"]

View file

@ -14,7 +14,7 @@ dependencies = [
]
[project.scripts]
hasspy = "botbotbot:main"
botbotbot = "botbotbot:main"
[dependency-groups]
dev = [