Commit Graph

7 Commits

Author SHA1 Message Date
Bryan Frimin
baf8cf0837 Support developer-specific env vars in sandbox provisioning
Source a gitignored .sandbox.env file (if present) before running
probod-bootstrap so each developer can inject their own secrets
(SSO, API keys, etc.) without committing them to the repo.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-19 22:04:08 +01:00
Bryan Frimin
fc2c3eab61 Isolate sandbox node_modules with VM-local bind mount
Avoid platform conflicts between macOS host and Linux VM by
bind-mounting a VM-local directory over /workspace/node_modules.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-19 22:04:06 +01:00
Bryan Frimin
2be7337344 Disable Lima automatic port forwarding for sandbox
Lima auto-forwards ports from the VM to localhost, which blocks local
development on the same ports (e.g. localhost:8080). Services are
already accessible via the VM IP shown by `sandbox.sh status`.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-18 20:03:36 +01:00
Bryan Frimin
f3aa0dea36 Fix sandbox provisioning failure due to missing LIMA_CIDATA_USER
The provision script relied on LIMA_CIDATA_USER being set in the
environment, but during cloud-init this variable is not exported — it
only exists in /mnt/lima-cidata/lima.env. The file cannot be sourced
directly because values like LIMA_CIDATA_COMMENT contain unquoted
spaces, so we extract LIMA_CIDATA_USER with sed instead.

Also ensure HOME is set for root's go install commands and explicitly
set PATH when running make as the Lima user via su, since profile.d
scripts may not be loaded during cloud-init provisioning.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-18 19:51:53 +01:00
Bryan Frimin
9fd3473147 Fix sandbox Docker root issue and replace make dev with systemd services
Fixes docker permissions by enabling Docker daemon during provisioning. Replaces make dev with three managed systemd services: probo-stack (auto-starting Docker Compose infra), probod (API server with gow for hot-reload), and probo-console (frontend dev server). The stack now starts automatically on VM boot; probod and console are started manually after build.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-18 19:51:53 +01:00
Bryan Frimin
312e30d9e4 Add sandbox-specific probod config generation
Add a make target for probod-bootstrap and integrate it into the sandbox provisioning workflow. During VM provisioning, generate /etc/probod/config.yml with the Lima VM IP as the cookie domain, secure=false for HTTP access, and correct CORS origins. Also generate .env files for console and trust apps pointing to the VM IP. Update sandbox documentation to explain the auto-generated configuration.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-18 15:06:37 +01:00
Bryan Frimin
46635e7f04 Add Lima sandbox environment for parallel feature testing
Implement a complete sandbox system for testing multiple features in parallel
using git worktrees and Lima VMs. Each worktree gets its own isolated VM with
Docker, full service stack, and unique IP via vzNAT networking.

- contrib/lima/provision.sh: Idempotent provisioning script (Docker, Go 1.26.1, Node.js 24, npm 11.8.0, Go tools, mkcert)
- contrib/lima/probo.yaml: Lima VM template with vz vmType, Rosetta, vzNAT, virtiofs mount
- contrib/lima/sandbox.sh: Lifecycle CLI (create, start, stop, restart, delete, ssh, exec, status, list)
- contrib/lima/README.md: Human documentation with prerequisites, quickstart, troubleshooting
- contrib/claude/sandbox.md: Agent reference doc for sandbox usage patterns
- GNUmakefile: Convenience targets for sandbox.sh commands
- AGENTS.md: Updated reference documentation index

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-17 08:46:48 +01:00