Skip to content

build: collector service Dockerfile#5

Merged
Svaag merged 1 commit into
mainfrom
feat/collector-dockerfile
Jun 29, 2026
Merged

build: collector service Dockerfile#5
Svaag merged 1 commit into
mainfrom
feat/collector-dockerfile

Conversation

@Svaag

@Svaag Svaag commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Adds the container image for the trace collector so the loop host can docker build it
like knowledge-mcp.

  • Dockerfile — python:3.12-slim + uv, installs agent-core[collector], runs
    python -m agent_core.collector (FastAPI); HYRULE_COLLECTOR_DATABASE_URL selects the DB
    (postgresql+asyncpg in prod).
  • .dockerignore.

Runtime validated by the collector TestClient suite (#4). No docker daemon in CI/dev here, so
the image build is validated on the target host by the ansible collector role (C3).

🤖 Generated with Claude Code

Container image for agent_core.collector; runs 'python -m agent_core.collector', set HYRULE_COLLECTOR_DATABASE_URL to postgresql+asyncpg in prod. Built on the loop host by the (forthcoming) ansible collector role via docker build, mirroring knowledge-mcp. Runtime validated via the TestClient suite; image build validated on the target host (no docker daemon in this dev env).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Svaag Svaag merged commit 576368b into main Jun 29, 2026
@Svaag Svaag deleted the feat/collector-dockerfile branch June 29, 2026 11:24

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 709131bcec

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Dockerfile
Comment on lines +22 to +25
RUN uv venv && uv pip install '.[collector]'

EXPOSE 8770
USER 65534:65534

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Configure a usable default database

When this image is launched without HYRULE_COLLECTOR_DATABASE_URL (the Dockerfile does not set one), agent_core.collector.db falls back to sqlite+aiosqlite:///./collector.db. That default is not usable in this image: the install here only pulls agent-core[collector], which omits aiosqlite, and after switching to UID 65534 the process also cannot create collector.db under the root-owned /app. A plain docker run therefore exits before /healthz is served unless every caller supplies a Postgres URL; either make the sqlite fallback work in the image or fail/configure explicitly around the required database URL.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant