SUNET / te-canvas

0 stars 1 forks source link

Database initialization collisions #13

Closed ernstwi closed 1 year ago

ernstwi commented 2 years ago

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

But there are more elegant solutions of course.

pnts-se commented 1 year ago

We now wait for sync service to start in docker-compose.yml