feat(devenv): MCP dev hot-reload with image-based approach (#145)

Add mcp-build.sh that compiles the MCP binary and packages it as an
OCI image layer on top of the base rootfs, imported directly into
containerd. Air triggers rebuild on code changes, cleaning stale
containers automatically.

Consolidate dev-only files (Dockerfiles, entrypoint, config, build
script) into devenv/ to separate dev tooling from production artifacts.
Skip image pull when already imported to speed up dev startup.
This commit is contained in:
BBQ
2026-03-02 14:59:48 +08:00
committed by GitHub
parent f9f968f13f
commit 04bce702b7
12 changed files with 131 additions and 26 deletions
+4 -11
View File
@@ -125,18 +125,11 @@ Memoh/
├── db/ # Database
│ ├── migrations/ # SQL migration files
│ └── queries/ # SQL query files (sqlc input)
├── conf/ # Configuration templates
│ ├── app.example.toml # Default configuration template
│ ├── app.dev.toml # Development configuration
│ ├── app.docker.toml # Docker deployment configuration
│ ├── app.apple.toml # macOS (Apple Virtualization) configuration
│ └── app.windows.toml # Windows configuration
├── devenv/ # Development environment (docker-compose for local infra)
├── docker/ # Docker build & runtime (Dockerfiles, entrypoints, nginx)
├── conf/ # Configuration templates (app.example.toml, app.docker.toml)
├── devenv/ # Dev environment (docker-compose, dev Dockerfiles, app.dev.toml, mcp-build.sh)
├── docker/ # Production Docker build & runtime (Dockerfiles, entrypoints, nginx.conf)
├── docs/ # Documentation site
├── scripts/ # Utility scripts
├── assets/ # Static assets (images, etc.)
├── data/ # Runtime data directory
├── scripts/ # Utility scripts (db, release, install)
├── docker-compose.yml # Docker Compose orchestration (production)
├── mise.toml # mise tasks and tool version definitions
├── sqlc.yaml # sqlc code generation config