diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..b2493da --- /dev/null +++ b/.dockerignore @@ -0,0 +1,34 @@ +# Keeps the build context small — the Dockerfile only COPYs pyproject.toml, +# uv.lock, and src/, so everything below is unnecessary to send to the daemon. + +# Virtual environment (by far the largest item) +.venv/ + +# Git +.git/ +.github/ +.gitignore + +# Secrets / local env (never bake into the image) +.env + +# Python caches and bytecode +__pycache__/ +*.py[cod] +.pytest_cache/ +.ruff_cache/ +.mypy_cache/ + +# Tests, test data, and evals — the bot reads ingested content from Postgres, +# and ingestion runs from the host, so none of these are needed in the image. +tests/ +data/ +evals/ + +# Coverage reports +.coverage +htmlcov/ + +# Local tickets (git-excluded) and editor/OS cruft +.vscode/ +.DS_Store diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..667b9c9 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim +WORKDIR /app +COPY pyproject.toml uv.lock ./ +RUN uv sync --frozen --no-install-project +COPY src/ ./src/ +CMD ["uv", "run", "python", "-m", "src.apps.discord_bot"]