rubyforgood / mutual-aid

Mutual aid management platform for groups who build, support, and strengthen community resilience.
https://github.com/rubyforgood/mutual-aid/projects/4
MIT License
54 stars 61 forks source link

Add Procfile.dev and instructions for its use. #997

Closed solebared closed 2 years ago

solebared commented 2 years ago

Simplify local development by defining the processes involved in a new Procfile.dev. This file is compatible with several process managers such as foreman, invoker and node-foreman.

Some considerations worth noting:

  1. I looked into the possibility of using the existing Procfile for both production and development. This would've required adding intelligence to startup scripts such as bin/webpack-dev-server so that they would no-op in production. Turned out to be more complicated because foreman interprets any early process exit as an error and aborts all processes.
  2. I chose not to introduce a convenience script such as bin/serve for a few reasons:
    1. I didn't want to assume/prescribe a specific process manager such as foreman.
    2. It's easy for engineers to create a shell alias or git-ignored script with their preferred process manager and startup options.

As such, while this Procfile.dev hopefully simplifies initial setup for a new contributor, i see its primary purpose as defining the processes involved more so than prescribing a canonical way of invoking them.