Skip to content

voidfiles/dokku-forego

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dokku-forego

dokku-forego is a plugin for dokku that injects forego to manage Procfile processes.

Installation

# Install the plugin:
git clone https://github.com/iskandar/dokku-forego.git /var/lib/dokku/plugins/forego

What it does

Normally, dokku only runs the web process within Procfile. The dokku-forego plugin will run all process types (web, worker, etc.) in your Procfile.

Scaling

Note: The Scaling feature is 100% compatible with dokku-logging-supervisord SCALE files, so you can switch between the two plugins if you wish.

This plugin supports running multiple of the same process type. At start it checks for a file in the apps home directory named SCALE. The file should be a series of lines of the form name=<num> where name is the process name and <num> is the number of processes of that type to start.

Example:

web=1
worker=5
clock=1

If the file does not exist then a single process of each type will be created for each process type in Procfile. Additional lines in the file ignored.

Note: All the processes will run in same Docker container. They do not run in separate containers. This means that if you have multiple "web" processes they will each try to listen on the same PORT environment variable. For this to work properly you should use the socket option SO_REUSEPORT. If that is not available then you will need to stick with a single web process.

Rather than editing the file manually you can use the command:

dokku scale myapp web=1 worker=6

This will generate a new SCALE file and then deploy the app. An app rebuild will not happen. It will just kill and restart your application.

Adding the SCALE file is done by copying it into the container. This adds another layer to the container's AUFS. As there is a max number of layers you may need to occasionally run a rebuild (try dokku rebuild myapp) to rebase the container.

Similar plugins

You can also use these plugins to manage Procfile processes:

Thanks

This plugin is heavily based on dokku-logging-supervisord, which is in turn based on dokku-supervisord and dokku-persistent-storage

License

This plugin is released under the MIT license. See the file LICENSE.

About

A dokku plugin that uses forego to run Procfile processes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages