Old Postgres on Docker Image with two containers: web and data

That is not the case. The base image for Discourse ships with PostgreSQL for many months already, since PostgreSQL 12 update.

Can you share you app.yml? Maybe you forced an old base image in it and forgout about it?