{% for p in processes -%}
[program:{{ p.name|dashrepl }}]
command={{ shell }} -c '{{ p.cmd|percentescape }}'
autostart=true
autorestart=true
stopsignal=QUIT
stdout_logfile={{ log }}/{{ p.name|dashrepl }}.log
stderr_logfile={{ log }}/{{ p.name|dashrepl }}.error.log
user={{ user }}
directory={{ app_root }}
environment=
    {%- for key,value in p.env.items() -%}
    {{ key }}={{ value|shellquote|percentescape }}
    {%- if not loop.last %},{% endif %}
    {%- endfor %}

{% endfor -%}
[group:{{ app }}]
programs={% for p in processes -%}
    {{ p.name|dashrepl }}{% if not loop.last %},{% endif %}
{%- endfor %}
