Hi Sébastien,
I spent some more time investigating this.
The problem only occurs after stopping and restarting both Orthanc & Postgres.
If I use the osimis/orthanc:21.2.0 container, the problem does not occur.
If I use the 21.4.0 container, which is the first with the PostgreSQL v4 plugin the problem occurs.
What I have noticed, is that using the 21.2.0 image, the modalities are stored in the serverproperties table. With this version, the server UUID remains the same after both containers are restarted.
However, with 21.4.0, the server UUID is different after the restart. I can see that the old modalities are still stored in the table, but Orthanc is using a new UUID and hence when the modalities are read from the database, they don't exist.
It appears that with 21.4.0 & the latest Postgres Plugin, the server UUID changes after restarting both the Orthanc container and the database container.
I hope that helps. Let me know if there is anything more I can do to help you replicate it.
Cheers,
James