Ngnix config is not retained after rebuild

You could make a template for your alterations and then include it in your app.yml. For example this SSL template rewrites some parts of the nginx config to support SSL.