Files
skillshare/.devcontainer/devcontainer.json
T
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

35 lines
912 B
JSON

{
"name": "Skillshare Dev",
"dockerComposeFile": "docker-compose.yml",
"service": "skillshare-devcontainer",
"workspaceFolder": "/workspace",
"features": {
"ghcr.io/devcontainers/features/node:1": {
"version": "24",
"pnpmVersion": "10.28.0"
}
},
"forwardPorts": [5173, 19420, 3000],
"portsAttributes": {
"5173": { "label": "Dashboard (ui)" },
"19420": { "label": "API Backend" },
"3000": { "label": "Docs (docs)" }
},
"remoteEnv": {
"PATH": "/workspace/.devcontainer/bin:/workspace/bin:${containerEnv:PATH}",
"SKILLSHARE_UI_HOST": "0.0.0.0"
},
"postCreateCommand": ".devcontainer/setup.sh",
"postStartCommand": ".devcontainer/start-dev.sh",
"customizations": {
"vscode": {
"extensions": [
"golang.go",
"bradlc.vscode-tailwindcss",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode"
]
}
}
}