Run db migration step before starting worker?
It is a common goal to make updating docker services as easy as possible – e.g. just by pulling a new version of the docker image and starting it without any additional steps.
Reading the indico update documentation, the only thing that seems missing for this to work with the docker images here would be calling
indico db upgrade
indico db --all-plugins upgrade
before starting the uwsgi service, correct?
Yeah, that sounds about right.
Yes. Just keep in mind that this only works if you run a single instance. If you scale horizontally, then executing in multiple times in parallel will likely lead to errors (not a problem, since those changes are transactional) or deadlocked queries (things get stuck and may require manual intervention).
Running the db upgrade in the celery container (which must be single-instance anyway) may be safer.
@ThiefMaster thanks, we are running a rather small deployment with a single worker, but I'll keep that in mind.