Greetings,
I’ve used liquibase in an old project and it worked just fine, but I’m having lots of trouble with this new one (this one uses docker and it’s a bit more complex).
Instead of trying to debug the hundreds of errors I’m having (unable to load entites, etc…) I think it might be quicker and better if you can help me with setting up liquibase from zero (in case you prefer helping me solving my errors, we can do that).
This is my project structure (docker containers)
backend-primary
postgres-primary
backend-secondary
postgres-secondary
zookeeper
kafka
backend-primary uses postgres-primary; backend-secondary uses postgres-secondary, kafka is used for sending datalogs from backend-primary to backend-secondary.
now, main problem I’m having is that backend-primary and postgres-primary are in the same network but different containers and so I cannot simply use liquibase:diff, but I need a more complex command:
docker run --rm -it -v ${PWD}:/app -w /app --network central-server_central-net maven:3.9.0 mvn "-Dliquibase.classpath=target/classes:target/dependency" liquibase:diff
I’m sure I cannot be the only one who has a project like that, but I’m really bad at these things and documentation has not been very helpful.
Can you please tell me how to set up liquibase for that ? Tell me everything from zero, please.
EDIT: my first attempt has been trying to put liquibase in backend-primary (and later I would have done the same for secondary). Then I thought it would have been better to create independent containers for liquibase with official images, but it looked really hard to do…
SPRING VERSION: 3.5.0
HIBERNATE VERSION: 6.6.15.Final