Posted about 2 years ago. Visible to the public.

Procfile support

If you need to run specific program(s) and be sure they will get restarted if they die or after a reboot, then you can create a file named Procfile in your repository.

If you want to use this feature, please contact, then we will enable it for your deployment.

Procfile Syntax

At the moment we only have limited Procfile features. The syntax is:

$program_name: $command


sidekiq: bundle exec sidekiq

Important: The defined commands should not daemonize, as then the supervisor can't track them anymore.

You can use environment variables in your command with %{ENV_VARIABLE}s where VARIABLE is the name of the environment variable, e.g. like this:

app: %{ENV_APPDIR}s/current/run_app start


After you've created the Procfile, you also need to setup the the tasks for the deployment. If you're using the Capistrano::Opscomplete Gem, you can insert these lines in your capistrano config:

# Update and Restart supervisor config after 'deploy:updating', 'opscomplete:supervisor:gen_config' after 'deploy:published', 'opscomplete:supervisor:restart_procs'

There are more tasks and configuration options. Please refer the Capistrano::Opscomplete README for further information.

Available commands on the server

If you don't want to integrate the Capistrano::Opscomplete Gem, you can use the shell commands available on the server. They're useful if you want to check/do things manually too.

  • supervisor_gen_config

This command generates the configuration for the supervisor. You need to run it before the other supervisor commands and at least every time you change your Procfile. But there is no harm running it at every deploy.

  • supervisor_restart_procs

This command rereads the supervisor configuration and (re)starts all configured programs.

  • supervisor_stop_procs

This command stops all your programs in case you want to them to be stopped while your deployment runs.

  • supervisor_status

This command shows the status of all configured supervisor programs.

  • supervisor_signal_procs $signal $program_name(optional)

This command sends the signal $signal (e.g. USR1 or TSTP) to all programs or if specified to $program_name.


The output of your programs (stdout and stderr) will get written into log files. You will find these logs here:

# stdout: ${appdir}/shared/log/${program_name}-1.log # stderr: ${appdir}/shared/log/${program_name}-1.error.log


At the moment we use supervisord as supervisor. But as we will perhaps change this in the future, please use the commands described above and do not manually create a configuration.

Owner of this card:

Kim Jahn
Last edit:
4 months ago
by Kim Jahn
Posted by Kim Jahn to opscomplete
This website uses short-lived cookies to improve usability.
Accept or learn more