image for running mybatis migrate
1.6K
Image to run mybatis migrate command, typically used in k8s init container to sync db version.
docker run -it --rm --network SAME-AS-YOUR-DB-NETWORK -v MIGRATE_SCRIPT_DIR:/mybatis/workspace enix223/mybatis-migrate up --env=production
Some famous db drivers are downloaded in /mybatis/drivers, so you can use it out of the box, driver including:
So you can refer the driver above you need in your migration properties file.
Suppose you are running migration against another container mysql8 for database test, you can set production.properties file like this:
# specify your db host and port
url=jdbc:mysql://mysql8:3306/test
# driver path
driver_path=driver_path=/mybatis/drivers/
/mybatis/workspace The migration script dir/mybatis/migrations mybatis migrate executable dir/mybatis/drivers Pre downloaded db drivers dirFor more detail, please visit this repo
Content type
Image
Digest
sha256:b7ec96dc1…
Size
146.2 MB
Last updated
almost 3 years ago
docker pull enix223/mybatis-migrate