canasta maintenance exec
From Canasta Wiki
canasta > maintenance > exec
canasta maintenance exec
Execute a command in a container
Synopsis
Execute an arbitrary command inside a container of a Canasta instance.
With no arguments and no --service flag, lists the running services. The default service is "web" (the MediaWiki container).
Use --stdin-file to feed a file to the command's standard input — for example, piping wikitext to maintenance/run.php edit <page>. The file is read on the controller, so it works for local, remote, and Kubernetes targets alike. Content is read as text (UTF-8).
canasta maintenance exec [flags]
Examples
canasta maintenance exec -- ls /var/www/mediawiki
canasta maintenance exec -s db -- mariadb-admin ping -h localhost
canasta maintenance exec --stdin-file page.txt -- php run.php edit 'Main Page'
Flags
| Flag | Shorthand | Description | Default | Required | Orchestrator |
|---|---|---|---|---|---|
--exec-args |
Command and arguments to execute | Both | |||
--id |
-i |
Canasta instance ID | * | Both | |
--service |
-s |
Service name (default: web) | Both | ||
--stdin-file |
File fed to the command's standard input (e.g. wikitext for an edit), read as UTF-8 on the controller. | Both | |||
--wiki |
-w |
Wiki ID | Both |
* Defaults to the Canasta instance matching the current directory, if any.
Global flags
| Flag | Shorthand | Description | Default | Required | Orchestrator |
|---|---|---|---|---|---|
--help |
-h |
Show help message and exit | Both | ||
--verbose |
-v |
Enable verbose output | Both |