feat: Docker Compose setup with Caddy reverse proxy#41
feat: Docker Compose setup with Caddy reverse proxy#41gabiudrescu wants to merge 3 commits intoJayantDevkar:mainfrom
Conversation
Three-container architecture behind Caddy (port 8080): - Caddy reverse proxy: /api/* → FastAPI, /* → SvelteKit - API: python:3.11-slim with healthcheck - Frontend: multi-stage node:22-slim build Includes dev override (HMR), read-write override, Makefile for orchestration, GitHub Actions workflow for GHCR image publishing, and dual browser/SSR API URL resolution in config.ts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Components like AgentList, SkillViewer, ToolList use new URL(API_BASE + path) which requires an absolute URL. The relative /api path caused "Failed to construct URL: Invalid URL" errors in the browser. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@JayantDevkar in retrospective, I should have started with an issue first, not with a PR, but I hoped code will speak on my behalf :D I was monitoring the repo in the past couple of days, since this has sparked my interest, so I was wondering if you had any chance to review this. curious how do you feel about this contribution and how do you see things moving forward. |
No worries, thanks for the PR. I'm glad you are interested in the project. I love Claude Code and it being opensource inspired me to opensource my side project so everyone can use. We will try to assign more time to this project soon. |
Hey there! 👋
First off, great project. I just discovered Claude Code Karma and I love what you've built here. Thanks for putting this together and maintaining it.
I wanted to make it easier to get started without installing Python and Node locally, so I put together a Docker Compose setup. The idea is a single
docker compose up(ormake up) and everything runs behind a Caddy reverse proxy on port 8080.What's in this PR:
~/.claudeis mounted read-only by default so nothing gets modifiedmake up,make dev,make health, etc.)frontend/src/lib/config.tsto handle both browser and SSR API URLs (the existing local dev workflow is unchanged)I tested this locally and it works well. Dashboard loads, API returns projects, health checks pass. I might be missing edge cases though, so any feedback is welcome.
Known limitation: live sessions don't show in Docker.
The live session tracker hook writes state files to
~/.claude_karma/live-sessions/on the host. In Docker, the API container uses a named volume for/root/.claude_karma(because it also writes the SQLite metadata database there), so it doesn't see the host's live session files. Mounting~/.claude_karmadirectly from the host would create SQLite locking conflicts between the container and any native API instance.A longer-term solution might be replacing SQLite with PostgreSQL or MySQL as a separate container. That would cleanly separate the database from the filesystem, allow the host's
~/.claude_karma/live-sessions/to be mounted read-only without locking issues, and open the door for multi-instance setups down the road. Just a thought, not sure if that aligns with the project's goals.No rush on reviewing this. Happy to adjust anything. 🙏
Gabi Udrescu
productowner.ro