I considered doing this in Docker as that is a supported install method and I’ve enjoyed using Docker; but Gitea ties together a few services — web frontend, git, database — which would have potentially needed some futzing to work with in a Docker context. So instead I went for another kind of container: LXC in proxmox.
For new services I have been using ansible to provide a sort of documentation. Postgres is supported by Gitea as a database type, so I figured I’d see if there were any guides to setting up a Postgres server with ansible.
There is a guide available, and it does some decent explanation of the different steps. However the ansible used is somewhat out of date- at least as far as I can tell, it gave a number of deprecation warnings and outright errors.