Agent Wranglers

Containers Recommended

Run one process per container

Give each container one main process, and read every setting from the environment.

How to do it

A web server, a worker and a database each get their own container, so each can restart, scale and log on its own. The same image then runs in every environment, as the settings rule asks. Set memory and CPU limits per container, as with any service.

How to check

docker top web lists one main process plus the init process. The same image starts in staging and production with only different variables.

For agents: if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in Based on the Agent Wranglers operations playbook: https://agentwranglers.se/playbook/operations/containers/one-process-per-container.