forked from Rockachopa/Timmy-time-dashboard
feat: migrate to Poetry, fix Docker build, and resolve 6 UI/backend bugs (#92)
Migrate from Hatchling to Poetry for dependency management, fixing the Docker build failure caused by .dockerignore excluding README.md that Hatchling needed for metadata. Poetry export strategy bypasses this entirely. Creative extras removed from main build (separate service). Docker changes: - Multi-stage builds with poetry export → pip install - BuildKit cache mounts for faster rebuilds - All 3 Dockerfiles updated (root, dashboard, agent) Bug fixes from tester audit: - TaskStatus/TaskPriority case-insensitive enum parsing - scrollChat() upgraded to requestAnimationFrame, removed duplicate - Desktop/mobile nav items synced in base.html - HTMX pointed to direct htmx.min.js URL - Removed unused highlight.js and bootstrap.bundle.min.js - Registered missing escalation/external task handlers in app.py Co-authored-by: Alexander Payne <apayne@MM.local> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
committed by
GitHub
parent
7b967d84b2
commit
ca0c42398b
@@ -6,30 +6,31 @@
|
||||
# Run: docker run -e COORDINATOR_URL=http://dashboard:8000 timmy-agent:latest
|
||||
|
||||
# ── Stage 1: Builder ──────────────────────────────────────────────────────────
|
||||
FROM python:3.12-slim as builder
|
||||
FROM python:3.12-slim AS builder
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
# Install build dependencies
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
gcc \
|
||||
curl \
|
||||
gcc curl \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy only pyproject.toml
|
||||
COPY pyproject.toml .
|
||||
# Install Poetry + export plugin for dependency export
|
||||
RUN pip install --no-cache-dir poetry poetry-plugin-export
|
||||
|
||||
# Create minimal package structure
|
||||
RUN mkdir -p src/timmy src/swarm src/infrastructure && \
|
||||
touch src/__init__.py src/timmy/__init__.py src/swarm/__init__.py \
|
||||
src/infrastructure/__init__.py config.py
|
||||
# Copy only dependency files for layer caching
|
||||
COPY pyproject.toml poetry.lock ./
|
||||
|
||||
# Install dependencies
|
||||
RUN pip install --no-cache-dir --user -e ".[swarm]"
|
||||
# Export pinned requirements and install with pip
|
||||
RUN poetry export --extras swarm --without-hashes \
|
||||
-f requirements.txt -o requirements.txt
|
||||
|
||||
RUN --mount=type=cache,target=/root/.cache/pip \
|
||||
pip install --no-cache-dir --user -r requirements.txt
|
||||
|
||||
|
||||
# ── Stage 2: Runtime ─────────────────────────────────────────────────────────
|
||||
FROM python:3.12-slim as runtime
|
||||
FROM python:3.12-slim AS runtime
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
@@ -43,7 +44,6 @@ COPY --from=builder /root/.local /root/.local
|
||||
|
||||
# Copy application source
|
||||
COPY src/ ./src/
|
||||
COPY config.py .
|
||||
|
||||
# Create data directory
|
||||
RUN mkdir -p /app/data
|
||||
|
||||
Reference in New Issue
Block a user