2026-02-22 16:21:32 -05:00
|
|
|
# ── Timmy Time — agent image ────────────────────────────────────────────────
|
|
|
|
|
#
|
|
|
|
|
# Serves two purposes:
|
|
|
|
|
# 1. `make docker-up` → runs the FastAPI dashboard (default CMD)
|
|
|
|
|
# 2. `make docker-agent` → runs a swarm agent worker (override CMD)
|
|
|
|
|
#
|
|
|
|
|
# Build: docker build -t timmy-time:latest .
|
|
|
|
|
# Dash: docker run -p 8000:8000 -v $(pwd)/data:/app/data timmy-time:latest
|
|
|
|
|
# Agent: docker run -e COORDINATOR_URL=http://dashboard:8000 \
|
|
|
|
|
# -e AGENT_NAME=Worker-1 \
|
|
|
|
|
# timmy-time:latest \
|
|
|
|
|
# python -m swarm.agent_runner --agent-id w1 --name Worker-1
|
|
|
|
|
|
feat: one-click cloud deployment — Caddy HTTPS, Ollama, systemd, cloud-init
Add complete production deployment stack so Timmy can be deployed to any
cloud provider (DigitalOcean, AWS, Hetzner, etc.) with a single command.
New files:
- docker-compose.prod.yml: production stack (Caddy auto-HTTPS, Ollama LLM,
Dashboard, Timmy agent, Watchtower auto-updates)
- deploy/Caddyfile: reverse proxy with security headers and WebSocket support
- deploy/setup.sh: interactive one-click setup script for any Ubuntu/Debian server
- deploy/cloud-init.yaml: paste as User Data when creating a cloud VM
- deploy/timmy.service: systemd unit for auto-start on boot
- deploy/digitalocean/create-droplet.sh: create a DO droplet via doctl CLI
Updated:
- Dockerfile: non-root user, healthcheck, missing deps (GitPython, moviepy, redis)
- Makefile: cloud-deploy, cloud-up/down/logs/status/update/scale targets
- .env.example: DOMAIN setting for HTTPS
- .dockerignore: exclude deploy configs from image
https://claude.ai/code/session_018CduUZoEJzFynBwMsxaP8T
2026-02-24 21:22:56 +00:00
|
|
|
FROM python:3.12-slim AS base
|
2026-02-22 16:21:32 -05:00
|
|
|
|
|
|
|
|
# ── System deps ──────────────────────────────────────────────────────────────
|
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
2026-02-25 07:20:56 -05:00
|
|
|
gcc curl fonts-dejavu-core \
|
2026-02-22 16:21:32 -05:00
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
|
|
# ── Python deps (install before copying src for layer caching) ───────────────
|
|
|
|
|
COPY pyproject.toml .
|
|
|
|
|
|
|
|
|
|
# Install production deps only (no dev/test extras in the image)
|
|
|
|
|
RUN pip install --no-cache-dir \
|
|
|
|
|
"fastapi>=0.115.0" \
|
|
|
|
|
"uvicorn[standard]>=0.32.0" \
|
|
|
|
|
"jinja2>=3.1.0" \
|
|
|
|
|
"httpx>=0.27.0" \
|
|
|
|
|
"python-multipart>=0.0.12" \
|
|
|
|
|
"aiofiles>=24.0.0" \
|
|
|
|
|
"typer>=0.12.0" \
|
|
|
|
|
"rich>=13.0.0" \
|
|
|
|
|
"pydantic-settings>=2.0.0" \
|
|
|
|
|
"websockets>=12.0" \
|
|
|
|
|
"agno[sqlite]>=1.4.0" \
|
|
|
|
|
"ollama>=0.3.0" \
|
|
|
|
|
"openai>=1.0.0" \
|
feat: one-click cloud deployment — Caddy HTTPS, Ollama, systemd, cloud-init
Add complete production deployment stack so Timmy can be deployed to any
cloud provider (DigitalOcean, AWS, Hetzner, etc.) with a single command.
New files:
- docker-compose.prod.yml: production stack (Caddy auto-HTTPS, Ollama LLM,
Dashboard, Timmy agent, Watchtower auto-updates)
- deploy/Caddyfile: reverse proxy with security headers and WebSocket support
- deploy/setup.sh: interactive one-click setup script for any Ubuntu/Debian server
- deploy/cloud-init.yaml: paste as User Data when creating a cloud VM
- deploy/timmy.service: systemd unit for auto-start on boot
- deploy/digitalocean/create-droplet.sh: create a DO droplet via doctl CLI
Updated:
- Dockerfile: non-root user, healthcheck, missing deps (GitPython, moviepy, redis)
- Makefile: cloud-deploy, cloud-up/down/logs/status/update/scale targets
- .env.example: DOMAIN setting for HTTPS
- .dockerignore: exclude deploy configs from image
https://claude.ai/code/session_018CduUZoEJzFynBwMsxaP8T
2026-02-24 21:22:56 +00:00
|
|
|
"python-telegram-bot>=21.0" \
|
|
|
|
|
"GitPython>=3.1.40" \
|
|
|
|
|
"moviepy>=2.0.0" \
|
|
|
|
|
"redis>=5.0.0"
|
2026-02-22 16:21:32 -05:00
|
|
|
|
|
|
|
|
# ── Application source ───────────────────────────────────────────────────────
|
|
|
|
|
COPY src/ ./src/
|
|
|
|
|
COPY static/ ./static/
|
|
|
|
|
|
|
|
|
|
# Create data directory (mounted as a volume in production)
|
|
|
|
|
RUN mkdir -p /app/data
|
|
|
|
|
|
feat: one-click cloud deployment — Caddy HTTPS, Ollama, systemd, cloud-init
Add complete production deployment stack so Timmy can be deployed to any
cloud provider (DigitalOcean, AWS, Hetzner, etc.) with a single command.
New files:
- docker-compose.prod.yml: production stack (Caddy auto-HTTPS, Ollama LLM,
Dashboard, Timmy agent, Watchtower auto-updates)
- deploy/Caddyfile: reverse proxy with security headers and WebSocket support
- deploy/setup.sh: interactive one-click setup script for any Ubuntu/Debian server
- deploy/cloud-init.yaml: paste as User Data when creating a cloud VM
- deploy/timmy.service: systemd unit for auto-start on boot
- deploy/digitalocean/create-droplet.sh: create a DO droplet via doctl CLI
Updated:
- Dockerfile: non-root user, healthcheck, missing deps (GitPython, moviepy, redis)
- Makefile: cloud-deploy, cloud-up/down/logs/status/update/scale targets
- .env.example: DOMAIN setting for HTTPS
- .dockerignore: exclude deploy configs from image
https://claude.ai/code/session_018CduUZoEJzFynBwMsxaP8T
2026-02-24 21:22:56 +00:00
|
|
|
# ── Non-root user for production ─────────────────────────────────────────────
|
|
|
|
|
RUN groupadd -r timmy && useradd -r -g timmy -d /app -s /sbin/nologin timmy \
|
|
|
|
|
&& chown -R timmy:timmy /app
|
|
|
|
|
USER timmy
|
|
|
|
|
|
2026-02-22 16:21:32 -05:00
|
|
|
# ── Environment ──────────────────────────────────────────────────────────────
|
|
|
|
|
ENV PYTHONPATH=/app/src
|
|
|
|
|
ENV PYTHONUNBUFFERED=1
|
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1
|
|
|
|
|
|
|
|
|
|
EXPOSE 8000
|
|
|
|
|
|
feat: one-click cloud deployment — Caddy HTTPS, Ollama, systemd, cloud-init
Add complete production deployment stack so Timmy can be deployed to any
cloud provider (DigitalOcean, AWS, Hetzner, etc.) with a single command.
New files:
- docker-compose.prod.yml: production stack (Caddy auto-HTTPS, Ollama LLM,
Dashboard, Timmy agent, Watchtower auto-updates)
- deploy/Caddyfile: reverse proxy with security headers and WebSocket support
- deploy/setup.sh: interactive one-click setup script for any Ubuntu/Debian server
- deploy/cloud-init.yaml: paste as User Data when creating a cloud VM
- deploy/timmy.service: systemd unit for auto-start on boot
- deploy/digitalocean/create-droplet.sh: create a DO droplet via doctl CLI
Updated:
- Dockerfile: non-root user, healthcheck, missing deps (GitPython, moviepy, redis)
- Makefile: cloud-deploy, cloud-up/down/logs/status/update/scale targets
- .env.example: DOMAIN setting for HTTPS
- .dockerignore: exclude deploy configs from image
https://claude.ai/code/session_018CduUZoEJzFynBwMsxaP8T
2026-02-24 21:22:56 +00:00
|
|
|
# ── Healthcheck ──────────────────────────────────────────────────────────────
|
|
|
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \
|
|
|
|
|
CMD curl -f http://localhost:8000/health || exit 1
|
|
|
|
|
|
2026-02-22 16:21:32 -05:00
|
|
|
# ── Default: run the dashboard ───────────────────────────────────────────────
|
|
|
|
|
CMD ["uvicorn", "dashboard.app:app", "--host", "0.0.0.0", "--port", "8000"]
|