When starting the Docker containers for the first time, I have noticed that there can be trouble if multiple containers/threads try to initialize the database at the same time.
The API is multithreaded by default so will always have this problem.
A simple solution is to start the sync service first on its own (with postgres): docker-compose up postgres sync
When starting the Docker containers for the first time, I have noticed that there can be trouble if multiple containers/threads try to initialize the database at the same time.
The API is multithreaded by default so will always have this problem.
A simple solution is to start the
sync
service first on its own (withpostgres
):docker-compose up postgres sync
But there are more elegant solutions of course.