Database starting before nakama

When running this docker-compose file, most of the time Nakama gets initialized before CockroachDB and Nakama returns an error and it get stuck like this:

After stopping the processes and executing again some times CockroachDB gets initialized before Nakama and it runs correctly
The problem with this is that the ratio of failure and success is like 20:1, does anyone knows how to solve this?
I’m running it on Google Compute Engine.

I was so dumb! Just changed in the docker compose file to restart: "always" instead of restart: "no" in the Nakama service

1 Like