thermostat run
This command runs a given application script that is defined in the scripts section of the Thermostat configuration file for the application deployed in the current directory. Any command line arguments passed to the command after the script name will be accessible in the script via the THERMOSTAT_SCRIPT_ARGS
environment variable.
Running a script entails creating a new Docker container with the image specified in the script configuration (or building the new Docker image based on the script configuration), mounting the setup script file and the primary script file into the container, mounting the application code and data folders into the container, and then running the setup script in the container. The setup script sets up the appropriate users, permissions, and configuration files in the container to allow it to run in a predictable fashion across a wide variety of different docker containers, and then it executes the primary script (the script defined in the script configuration in the thermostat.yml
file) in the application code directory. When the primary script finishes running or is cancelled by the user, Thermostat removes the script Docker container to clean everything up.
Usage:
$ thermostat run <script> [args..]
Positionals:
script [string] [required] The name of the script to run
args [array] The arguments to pass to the script