According to this: https://www.postgresql.org/message-id/12168.1312921709%40sss.pgh.pa.us
it is not possible to mount "data" dir directly as for example longhorn volume in kubernetes so I should mount the parent folder, but according to
https://github.com/docker-library/postgres/blob/master/14/alpine/Dockerfile
line 155 VOLUME /var/lib/postgresql/data
it does not work to mount it, because then it only contains an empty "data" folder (next to the lost+found one) and the actuall database is then mounted separately into an anonymous volume and therefore lost on container restart.
So what is the solution?