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 namedProcfile (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
- Ruby / Rails
- Node.js
- Python
- Go
- Java
Result JSON
Process information from the Procfile is recorded in the build result JSON (whenRESULT_FILE is set):
Process Classification
| Process Type | Classification | Description |
|---|---|---|
web | Main process | HTTP-serving entry point |
release | Release script | Run during deployment (e.g., migrations) |
| Any other | Worker | Background processes |
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
Port Configuration
ThePORT environment variable (default: 5000) is exposed in the container. Your Procfile command should bind to this port:
app.json Integration
If your project includes anapp.json file, process formation (replicas) can be configured alongside the Procfile: