Database fault tolerance / Docker

I have noticed that gitea with a configured MySQL database isn’t very fault tolerant when the database server isn’t available, it fails to start without any error message. While one can talk about the error verbosity, this is generally an acceptable behaviour.

But currently i am migrating my setup to docker. Docker containers have a restart policy, which does not check for dependencies. So my question is, if i deploy gitea via the gitea/gitea docker image, and try to start it while the configured MariaDB container hasn’t spun up yet, what is giteas behaviour then? I am assuming a gitea container restart loop until gitea manages to establish a MySQL connection, since gitea as the container’s main executable crashes without the connection, so docker is automatically restarting the container. Is my assumption correct, or will gitea inside the container just crash, while the container lives on, and i have to figure out how to orchestrate the containers accordingly to their dependency?

I run gitea in a docker swarm. From my experience docker tries to restart the gitea container until the database connection can be established.
Haven’t implemented any extras. Just the basic gitea and db containers.

Best regards

True, but some sort of error message would be really helpful.
In my case, the container with the old gitea version runs fine. At some point gitea must have broken backwards compatibility with the database (and it’s not documented grrrr) and the only way you find out is because the web frontend isn’t started and the container restarts a gazillion times.
That’s not exactly maintainer friendly.