Code Monkey home page Code Monkey logo

liquibase-percona's Introduction

liquibase-percona docker container

You can use this repository for mysql database migration for your project. It is using image from dockerhub -> divanov/liquibase-percona with maven and percona-toolkit liquibase-percona extention from adangel is added in pom.xml

Usage:

The container expect you to provied 4 variables (DB_NAME,DB_HOST,DB_USER,DB_PASS) and mount direcotry container all the migrations + the migration changelog.

To run the container you need to do:

docker run -e DB_HOST='host' -e DB_NAME='name' -e DB_USER='user' -e DB_PASS='pass' -it -v ./path/to/ur/migration/dir:/liquibase/migrations divanov/liquibase-percona mvn resources:resources liquibase:update -Ptest

What the command do:

  1. It starts a container from divanov/liquibase-percona image
  2. Adds all files from the repository as a volume
  3. Starts maven with the "pom.xml" where are described necessary dependencies and plugins:

mysql-connector-java -v 8.0.17 liquibase-maven-plugin -v 3.6.3 com.github.adangel.liquibase.ext -v 1.6.0

Maven builds with the resources from "src/main/migrations" all the changes to the desired database.

Also it is very useful to use this with Gitlab. Then you can add something like this code in your .gitlab-ci

    - mvn resources:resources liquibase:tag -Dliquibase.tag="${CI_JOB_ID}" liquibase:update

Where the changes will be tagged with the build and later you can rollback by this tag

    - mvn resources:resources liquibase:rollback -Dliquibase.rollbackTag="${CI_JOB_ID}"

liquibase-percona's People

Contributors

ivanov-devops avatar l4m3rx avatar dependabot[bot] avatar

Watchers

 avatar

Forkers

l4m3rx

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.