Commit Graph
5 Commits
Author SHA1 Message Date
Willie 13d9b82be7 fix: devcontainer token loading from .env and host env fallback
- Remove token vars from remoteEnv (localEnv overrides .env with empty)
- Pass host tokens via docker-compose environment as fallback
- Add profile.d script to source .devcontainer/.env in login shells
- Add sandbox token passthrough for GitLab/Bitbucket/generic tokens
- Add root .env to .gitignore
2026-02-22 15:13:10 +08:00
Willie 084d93bf94 feat(devcontainer): add credential-helper toggle and token forwarding
Add tooling for testing private repo auth inside the devcontainer:

- credential-helper script (on/off/status) with --eval mode to
  toggle both git credential helper and token env vars in one command
- remoteEnv forwards host token env vars (GITHUB_TOKEN, GITLAB_TOKEN,
  BITBUCKET_TOKEN, BITBUCKET_USERNAME, SKILLSHARE_GIT_TOKEN)
- docker-compose env_file for .devcontainer/.env (optional, gitignored)
- start-dev.sh auto-detects GITHUB_TOKEN from gh CLI on container start
- .env.example template for all supported tokens
- docker-sandbox.md documents token sources and private repo testing
2026-02-21 06:07:35 +08:00
Willie 595fe84c6b refactor(devcontainer): simplify dev server management
Replace dev-servers with self-contained `ui` and `docs` commands:
- `ui` / `ui -p`: build binary, start API (global/project) + Vite
- `ui stop`: stop API + Vite
- `docs` / `docs stop`: start/stop Docusaurus
- Remove `ui-p` script (merged into `ui -p`)
- Fix PID reuse false-positive in is_running() via /proc/cmdline
- Fix process tree cleanup in do_stop() (kill children before parent)
- Fix pkill pattern to match `skillshare-dev` binary name
- Update devcontainer.json port labels and ordering
- Update docker-sandbox.md to reflect new commands
2026-02-20 22:13:33 +08:00
Willie 1b5056d0ea refactor(docker): unify versions, consolidate init scripts, add sandbox-logs
- Add `make sandbox-logs` / `mise run sandbox:logs` convenience target
- Unify Docker build versions via ARG: Node 24, pnpm 10.28.0, Go 1.25.5
- Extract shared demo content to scripts/create-demo-content.sh, slim down
  setup.sh and sandbox_playground_up.sh from ~150 duplicated lines each
- Move devcontainer scripts (ui, ui-p, docs) to .devcontainer/bin/
  (source-controlled, survives make clean) with auto mode-switching
2026-02-20 12:22:02 +08:00
Willie 626f0f2240 feat(devcontainer): add Node.js 24, auto-start dev servers, and dev-servers manager
Enable full frontend development inside the devcontainer without
falling back to the host. Three dev servers (Go API :19420, Vite :5173,
Docusaurus :3000) start automatically via postStartCommand and can be
managed with the `dev-servers` CLI (start/stop/restart/status/logs).

Key changes:
- Add Node.js 24 + pnpm devcontainer feature
- Auto-install ui/ and website/ dependencies in setup.sh
- Add dev-servers.sh process manager with PID tracking
- Replace shell aliases with PATH scripts (ss, skillshare-ui, etc.)
- Set Vite server.host: true for container accessibility
- Make ui-dev Go server host configurable via SKILLSHARE_UI_HOST env var
- Forward ports 5173 and 3000 alongside 19420
- Harden setup.sh with environment guard and safe_cleanup helpers
- Update docker-sandbox.md with frontend development section
2026-02-20 04:12:34 +08:00