Can a Procfile have comments?

Yes, you can put comments in a Procfile. I know of two programs which parse Procfiles, foreman and forego.

In foreman, which originated the Procfile format, a Procfile can contain comments, blank lines, and in fact any line that doesn’t look like a meaningful Procfile line.

From the class that parses a Procfile:

# A valid Procfile entry is captured by this regex:
#   /^([A-Za-z0-9_]+):\s*(.+)$/
# All other lines are ignored.

forego, which Heroku uses, follows the same scheme.

Leave a Comment