Add runtime-configured Lab 3 browser terminal
This commit is contained in:
@@ -20,20 +20,22 @@ npm run dev
|
||||
|
||||
## Lab 3 Web Terminal
|
||||
|
||||
Set `NEXT_PUBLIC_LAB3_TERMINAL_PATH` to the WeTTY endpoint used by your deployment. The default expected path is `/wetty`, and `.env.example` includes that value. Local environments can also provide a full URL such as `http://127.0.0.1:7681/wetty`.
|
||||
The Lab 3 terminal now prefers a runtime-served config artifact at `/courseware-runtime.json`.
|
||||
|
||||
The Lab 3 widget assumes:
|
||||
Expected fields:
|
||||
|
||||
- WeTTY runs on the lab host and is bound to `127.0.0.1`
|
||||
- the public proxy forwards `/wetty` to the local WeTTY port
|
||||
- WebSocket upgrade happens at the reverse proxy
|
||||
- WeTTY is launched as root so it can present `/bin/login` locally instead of SSH
|
||||
- `lab3TerminalUrl`
|
||||
- `lab3Username`
|
||||
- `lab3WorkingDirectory`
|
||||
|
||||
Example service command:
|
||||
Local development still falls back to `/wetty`, and `.env.example` keeps that default for simple standalone runs.
|
||||
|
||||
```bash
|
||||
wetty --host 127.0.0.1 --port 3001 --base /wetty --allow-iframe
|
||||
```
|
||||
The Linux/WSL deployment contract is:
|
||||
|
||||
- loopback-only `sshd` on `127.0.0.1:22`
|
||||
- WeTTY exposed to the browser on `http://127.0.0.1:7681/wetty`
|
||||
- a managed `student` login
|
||||
- a working directory at `/home/student/lab3`
|
||||
|
||||
## Project Structure
|
||||
|
||||
|
||||
Reference in New Issue
Block a user