Add smart Caddy auto-configuration
This commit is contained in:
16
SKILL.md
16
SKILL.md
@@ -29,6 +29,7 @@ Installs [ttyd](https://github.com/tsl0922/ttyd) - a simple command-line tool fo
|
||||
| `TTYD_COMMAND` | Command to run | `/bin/bash` |
|
||||
| `TTYD_CREDENTIAL` | Basic auth (user:pass) | (none) |
|
||||
| `TTYD_OPTIONS` | Additional ttyd options | (none) |
|
||||
| `TTYD_DOMAIN` | Domain for Caddy auto-config | (none) |
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -54,7 +55,20 @@ TTYD_CREDENTIAL="admin:secret" ./scripts/run.sh
|
||||
TTYD_COMMAND="htop" ./scripts/run.sh
|
||||
```
|
||||
|
||||
### With Caddy (HTTPS)
|
||||
### Auto-configuration with Caddy
|
||||
|
||||
If the `caddy` skill is present, ttyd will automatically register itself:
|
||||
|
||||
```bash
|
||||
# Set domain for auto-config
|
||||
TTYD_DOMAIN="terminal.example.com"
|
||||
```
|
||||
|
||||
This creates a snippet in `caddy/snippets.d/ttyd.caddy` that Caddy imports on startup.
|
||||
|
||||
### Manual Caddy Config
|
||||
|
||||
If not using auto-config:
|
||||
|
||||
```caddyfile
|
||||
terminal.example.com {
|
||||
|
||||
Reference in New Issue
Block a user