From 5c6e39d2c02807663b01b8d8d644b23dbe84690b Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 14 May 2016 14:53:46 -0400 Subject: [PATCH] Clarify the role of process types for buildpack deployment Closes #2158 [ci skip] --- docs/deployment/buildpacks.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/docs/deployment/buildpacks.md b/docs/deployment/buildpacks.md index a8b586bd1..80755233a 100644 --- a/docs/deployment/buildpacks.md +++ b/docs/deployment/buildpacks.md @@ -56,6 +56,31 @@ You may also wish to use a **specific** version of a buildpack, which is also si dokku config:set APP BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-nodejs#v87 ``` +## Specifying commands via Procfile + +While many buildpacks have a default command that is run when a detected repository is pushed, it is possible to override this command via a Procfile. A Procfile can also be used to specify multiple commands, each of which is subject to process scaling. See the [process scaling documentation](/dokku/process-management/) for more details around scaling individual processes. + +A Procfile is a file named `Procfile`. It should be named `Procfile` exactly, and not anything else. For example, `Procfile.txt` is not valid. The file should be a simple text file. + +The file must be placed in the root directory of your application. It will not function if placed in a subdirectory. + +If the file exists, it should not be empty, as doing so may result in a failed deploy. + +The syntax for declaring a `Procfile` is as follows. Note that the format is one process type per line, with no duplicate process types. + +``` +: +``` + +If, for example, you have multiple queue workers and wish to scale them separately, the following would be a valid way to work around the requirement of not duplicating process types: + +``` +worker: env QUEUE=* bundle exec rake resque:work +importantworker: env QUEUE=important bundle exec rake resque:work +``` + +The `web` process type holds some significance in that it is the only process type that is automatically scaled to `1` on the initial application deploy. See the [process scaling documentation](/dokku/process-management/) for more details around scaling individual processes. + ## Clearing buildpack cache Building containers with buildpacks currently results in a persistent `cache` directory between deploys. If you need to clear this cache directory for any reason, you may do so by running the following shell command: