Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Git
.git/
.gitignore

# Documentation and tests (not needed in production image)
docs/
tests/
*.md

# IDE and editor files
.vscode/
.idea/
*.swp
*.swo

# Python cache
__pycache__/
*.py[cod]
*$py.class

# Hermes specific
*.jsonl
*.jsonl.offset
27 changes: 27 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Dockerfile for Hermes Agent
FROM python:3.12-slim

WORKDIR /app

# Install uv for fast, reliable dependency resolution (pinned for reproducibility)
COPY --from=ghcr.io/astral-sh/uv:0.5.25 /uv /bin/uv

# Copy project files (explicit uv.lock required for --frozen)
COPY pyproject.toml uv.lock ./
COPY src/ ./src/

# Install production dependencies only
RUN uv sync --frozen --no-dev

# Ensure logs reach the container log driver immediately
ENV PYTHONUNBUFFERED=1
ENV ALERTS_JSONL_PATH=/var/hermes/alerts.jsonl
ENV ALERT_OFFSET_PATH=/var/hermes/alerts.jsonl.offset
ENV METRICS_PORT=8091

RUN mkdir -p /var/hermes

# metrics endpoint — implemented in task 2.7
EXPOSE 8091

CMD ["uv", "run", "python", "-m", "agentic_node_ops.processor"]
4 changes: 4 additions & 0 deletions src/agentic_node_ops/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,3 +187,7 @@ def run_processor_loop(
"""
log.info("Starting alert processor loop (poll interval: %ss)", poll_interval)
asyncio.run(_run_loop_async(db, dispatcher, poll_interval))


if __name__ == "__main__":
run_processor_loop()
Loading