LetsEncrypt working without www, not with www

That isn’t a solution, the changes will be eradicated whenever templates are updated and for that reason alone is inadvisable.

If you want to modify files within the container use hooks in your app.yml