I used a % as a special character in my SMTP password. This caused a control character to be created in the app.yml file that caused the following errors
(): control characters are not allowed at line 1 column 1 -e LANG=en_US.UTF-8 YAML syntax error. Please check your containers/*.yml config files.
I tried rerunning discourse-setup and it kept failing.
Eventually the data field in the app.yml file looked like this:
DISCOURSE_SMTP_PASSWORD: "74 DISCOURSE_SMTP_PASSWORD: "74% DISCOURSE_SMTP_PASSWORD: 74%DISCOURSE_SMTP_PASSWORD: 7e[3~e[3~e[3~e[3~e[3~74%DISCOURSE_SMTP_PASSWORD: pa$$word......"
To resolve I had to manually edit the app.yml file to remove all the bad data and had to remove the % sign from my password. The setup than ran smoothly and allowed the setup of a new discourse install.