Running Rake tasks
Introduction
You can choose to run your Rake tasks automatically or manually. Running them automatically involves either scheduling them by using the Rake task add-on or by using deploy hooks. Alternatively, you can run them manually on your server.
Scheduling Rake tasks
Read more about Rake Jobs in the documentation.
Using deploy hooks
You can use deploy hooks to execute your rake task at any point of your deployment.
Simply add a bash script to the application that contains the rake task. For example, create the file /.cloud66/scripts/rake_task.sh
as below:
Then add a deploy_hook to execute the above script on each deploy: create the file .cloud66/deploy_hooks.yml
as below:
Manually
This is done by starting a terminal connection to your server and executing your rake task.