In my company, we have a Spring Boot application with maven that we run daily on IntelliJ for development. But when it comes to staging and production we use docker and docker-compose. Currently, we are doing the migrations manually through SQL and bash scripts. We want to migrate to Liquibase.
After investigation, I decided to use the Liquibase maven plugin only without the dependency for development, as I don’t want the migrations to be executed automatically at all. I created a database folder that contains the liquibase.properties
file in addition to the change logs. For development, the development team will execute mvn liquibase:update
normally and other Liquibase commands.
For the production and staging, I decided to use the Liquibase docker image and mount the changelogs folder and pass the Liquibase properties through the docker-compose.
Is this implementation correct, using mvn plugin for development and docker-compose with mounts for production and staging? or there is a better way to achieve this.