Document {container} placeholder in README
This commit is contained in:
@@ -109,13 +109,19 @@ Containers that only specify `webterm-theme` are still included and use the defa
|
|||||||
|
|
||||||
**Environment Variables:**
|
**Environment Variables:**
|
||||||
- `WEBTERM_DOCKER_USERNAME` - Set to run Docker exec sessions as a specific user (default: root)
|
- `WEBTERM_DOCKER_USERNAME` - Set to run Docker exec sessions as a specific user (default: root)
|
||||||
- `WEBTERM_DOCKER_AUTO_COMMAND` - Override the default `auto` command (default: `tmux new-session -As webterm`)
|
- `WEBTERM_DOCKER_AUTO_COMMAND` - Override the default `auto` command (default: `/bin/bash`). Supports `{container}` placeholder for the container name.
|
||||||
|
|
||||||
Example: Start containers and exec into them as `developer` user:
|
Example: Start containers and exec into them as `developer` user:
|
||||||
```bash
|
```bash
|
||||||
WEBTERM_DOCKER_USERNAME=developer webterm --docker-watch
|
WEBTERM_DOCKER_USERNAME=developer webterm --docker-watch
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Example: Use tmux with per-container session names:
|
||||||
|
```bash
|
||||||
|
WEBTERM_DOCKER_AUTO_COMMAND="tmux new-session -ADs {container}" webterm --docker-watch
|
||||||
|
```
|
||||||
|
This creates a tmux session named after each container (e.g., `my-webapp`, `redis`, etc.) instead of a shared session name.
|
||||||
|
|
||||||
Example docker-compose.yaml:
|
Example docker-compose.yaml:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
|||||||
Reference in New Issue
Block a user