Well after much head banging because bootstrapping from a fresh install to debug is sooo painfully slow, I found the
and squashed it in
https://github.com/discourse/discourse_docker/commit/659ab19e6fa2c8284a500da810bec00f02e6e2e3
The web template was still generating a file which was moved into the base image. However, the commands in the file was blowing up because it was trying to chmod certain files that would have existed during the first run. As a result, the Let’s Encrypt was not being executed at all during the first run.