You should delete these steps and create app.yml without generating this error. It’s confusing.
(If you’re going to replace the whole file, why copy the example?) The better thing to do is to say what needs to be changed from the existing sample. Looks like it’s the socket template and force https.
This gives you two copies of postgres, which uses more ram than a single postgres would. It works, but it’s not a best practice.
There are a number of things that make this not a good example to follow and it will be very difficult to support. I’m happy that you figured out a solution for you, but I don’t think that this is a good path to send people down.