Problem with rebuilding Discourse on self hosted

latest build with self hosted discourse picks up local hostname instead of HOSTNAME in app.yml - why?

how can I roll back to an old container after a failed build?