Returned to initial configuration

I have a docker installed gitea and it’s been working fine. Today it was brought up and the data directory was not mounted. I took it down and mounted it and brought it back up but now it just returns to the initial configuration page, although the values that need to be changed are correct (like URL).

What makes it go into initial configuration and how can I recover it? The data and configuration is all there that I can see so I’m a bit stumped.