4 Commits
Author SHA1 Message Date
Willie 5739e59ab6 docs: clarify dev workflow and fix sandbox/dev runtime issues
- Distinguish two dev workflows: make ui-dev (local Go) vs
  dev-docker-up + pnpm run dev (no Go required)
- Add auto-init to dev profile so container doesn't crash on first run
- Add --cap-add ALL to playground volume init (cap_drop blocks chmod)
- Document port 19420 conflict between playground and dev profile
- Add docker-build vs docker-build-multiarch explanation and GHCR pull examples
- Increase git command timeout to 180s for constrained Docker networks
- Increase online test timeout to 300s
- Align Makefile help text formatting
2026-02-13 15:52:53 +08:00
Willie c4a0c64911 feat(docker): add graceful shutdown, security hardening, production/CI images, and dev profile
Server improvements:
- Graceful shutdown with SIGTERM/SIGINT (10s grace period)
- HTTP timeouts (ReadHeader 5s, Read 15s, Write 30s, Idle 60s)
- Health endpoint now returns version and uptime

Compose security hardening:
- read_only filesystem, cap_drop ALL, no-new-privileges
- Resource limits (2 CPU / 2G memory), tmpfs for /tmp
- Playground healthcheck via /api/health

New Docker images:
- docker/production/ — lightweight debian-slim with tini, non-root user, healthcheck
- docker/ci/ — minimal image for skill validation in pipelines
- .github/workflows/docker-publish.yml — multi-arch GHCR publishing on tag push

Script improvements:
- DRY: test_docker.sh --online flag replaces duplicate test_docker_online.sh
- _sandbox_common.sh: Compose v2 version check with install suggestions
- .dockerignore: exclude website/, .github/, editor files

New targets:
- sandbox-status, dev-docker-up/down, docker-build, docker-build-multiarch

Docs updated: CLAUDE.md, README.md, website docker guide with use cases
2026-02-13 15:29:52 +08:00
Willie 503ee8af24 refactor: DRY up Docker sandbox scripts with shared entrypoint and boilerplate
- Add docker/sandbox/entrypoint.sh to auto-copy /ui-dist → internal/server/dist/
  when missing, fixing the gitignore regression for all Docker workflows
- Add scripts/_sandbox_common.sh with shared SCRIPT_DIR, PROJECT_ROOT,
  COMPOSE_FILE, and require_docker() function
- Refactor all 5 sandbox scripts to source _sandbox_common.sh
- Use YAML extension fields (x-sandbox-common) in docker-compose.sandbox.yml
  to eliminate duplicated service config
- Break sandbox_playground_up.sh one-liner into readable steps, add
  skillshare-ui alias and init hint
- Change test.sh to use `make build` for placeholder consistency
2026-02-08 16:32:28 +08:00
Willie 080e29e0ff feat: add docker sandbox test/playground workflows and docs 2026-02-07 21:55:20 +08:00