Set cgroup max memory via ENV

We can't use `%x[]` in ERB, since our templates will be processed by
`erb -S 2`, prohibiting use of tainted strings.

Instead, we drop env files during the setup so that we can pick it up
when ERB templates are processed.