I have separate DB schemas (could have used different DB instances) for each tenant to be able to cleanly separate their data.
For a single tenant setup the following container configuration is used:
...
liquibase:
image: "liquibase/liquibase:4.17.2"
volumes:
- ../migration:/liquibase/db/migration/
- ./liquibase.properties:/liquibase/liquibase.properties
command: --defaultsFile=liquibase.properties update
...
Each DB schema has to be updated the same way every time the changelog is updated.
My first idea is to create as many containers (short lived) as schemas, however that doesn't really scale that well if you have a lot of them (~100).
But is there a better way?
(eg. to execute the liquibase CLI for multiple schemas (multiple liquibase.properties?) in a single container - nothing found about that in their docs)