Overview

migetpacks supports Procfiles for defining process types in your application. A Procfile declares the commands used to run different process types (web server, background workers, scheduled tasks, etc.).

Procfile Format

A Procfile is a plain text file named Procfile (no extension) in the project root. Each line declares a process type:

Example Procfile

Process Priority

migetpacks determines the main process command using the following priority order:
1

RUN_COMMAND environment variable

If set, this always takes precedence over any Procfile entry.
2

web: from Procfile

The web process type is the standard entry point for HTTP-serving applications.
3

First process in Procfile

If no web: entry exists, the first process declared in the Procfile is used.
4

Language-specific default

If no Procfile exists and RUN_COMMAND is not set, a language-specific default is used (e.g., node server.js, python app.py).

Language Examples

Result JSON

Process information from the Procfile is recorded in the build result JSON (when RESULT_FILE is set):

Process Classification

Overriding with RUN_COMMAND

You can override the Procfile’s web process without modifying the file:
RUN_COMMAND only overrides the main container command (equivalent to Docker CMD). Worker processes from the Procfile are still recorded in the result JSON for deployment systems that support multiple process types.

DHI Considerations

When building with USE_DHI=true, Procfile commands are adjusted for distroless containers:
  • Shell-style commands are converted to exec format
  • Ruby shebang scripts (e.g., ./bin/rails) are prefixed with ruby (e.g., ruby bin/rails)
  • Shell variable expansions like ${PORT:-5000} are pre-expanded to literal values

Port Configuration

The PORT environment variable (default: 5000) is exposed in the container. Your Procfile command should bind to this port:

app.json Integration

If your project includes an app.json file, process formation (replicas) can be configured alongside the Procfile:
This formation data is included in the result JSON for deployment systems: