kpcyrd / what-the-src

Source code of https://whatsrc.org/
https://whatsrc.org/
GNU General Public License v3.0
27 stars 4 forks source link

Add database container dependency #16

Open tacerus opened 2 months ago

tacerus commented 2 months ago

Avoid the daemon/worker containers failing because of the database one not being ready yet.

kpcyrd commented 2 months ago

Is this something you experience or something you're assuming?

I'm not using lower-level connect calls but a higher-level interface provided by sqlx::Pool. :) In my local tests the database adapter is able to handle this on its own, if the database is unavailable the database calls hang until it becomes available again, without raising errors. This is also useful for when I need to restart the database.

tacerus commented 2 months ago

When I use podman-compose up -d, the database container is running, but the other two are showing as failed with an error about not being able to resolve the database hostname (I can find it again later if needed) - I then need to manually start them a second time. With the added dependency, this problem does not exist (the worker one now only fails because of a missing --git-tmp argument, that's a separate issue ...).