Ruby Post Deploy Configuration

Jelastic can perform post deployment application configuration via rake. This is usually needed to finalize configuration of complex applications, to run additional applications or specific steps for application configuration like db:migrate.

To do this we've introduced a new file called rake_deploy. It is located in the application root and contains a list of the commands that have to be passed to rake. Each command has to be located in a separate line. Commands are executed successively.

Jelastic executes commands from rake_deploy with each restart of the apache/nginx service and deletes them right after successful execution. As a result, if you need to bypass different commands to rake on each deploy you need to create a rake_deploy file each time and put the correct commands there.

Jelastic puts the output of each rake_delpoy into a corresponding log file which is available via "Logs" view in the Jelastic Dashboard.

Syntaxis of rake_deploy file:


And Jelastic will execute the following scripts:


In case of Redmine rake_deploy looks like the following:


Note: To freeze gems you need to add this command to rake_deploygems:unpack

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request



Article is closed for comments.