Custom Deployment Actions
You can define custom actions in the Squash YAML file. These are custom commands that will be executed inside your application’s container. When you define a custom action it will appear in the Deployment settings page, as a new item within the “Actions” dropdown.
This is an easy way to quickly run routine/common tasks inside a Squash deployment without the need of having to SSH to the host VM. By default these commands will be executed inside all containers running in the Host VM, but you can also specify commands that are container specific.
Here is an example of two custom actions we have defined, the YAML file sample is below.
Example YAML file:
deployments: CRM: filename: ./src/CRM/docker-compose.yml context_path: ./src vm_size: 2GB deployment_page_commands: Restart Cache: - /etc/init.d/memcached restart Git Pull & App Restart: - /home/code/acme-app/etc/my_init.d/app-restart.sh
And here is another example that is container specific, the “Restart Cache” command below will only execute inside the “app-container” container:
deployments: CRM: filename: ./src/CRM/docker-compose.yml context_path: ./src vm_size: 2GB deployment_page_commands: Restart Cache: app-container: - /etc/init.d/memcached restart
For more details please check the deployment_page_commands specification.