How to add ready command
When you are building a sandbox template you can specify the ready command by using the--ready-cmd
option:
Bash
Sandbox template config
You can specify the ready command inside thenovita.toml
in the same directory where you run novita-sandbox-cli template build
.
Toml
Default values
By default, the ready command is set tosleep 0
, which means the sandbox template will be ready immediatelly.
If the start command is defined, the default is set to sleep 20
, which means that the template sandbox will wait for 20 seconds before taking the snapshot.
Examples
Here are some examples of the ready command you can use.Wait for URL to return 200 status code
Bash
Wait for a specific process to start
Bash
Wait for a file to exist
Bash