All Projects → flyway → Flyway Docker

flyway / Flyway Docker

Licence: apache-2.0
Official Flyway Docker images

Projects that are alternatives of or similar to Flyway Docker

Flyway Sbt
Flyway SBT plugin
Stars: ✭ 101 (-17.89%)
Mutual labels:  database-migrations, database, continuous-delivery, continuous-deployment
Liquibase
Main Liquibase Source
Stars: ✭ 2,910 (+2265.85%)
Mutual labels:  database-migrations, database, continuous-delivery, continuous-deployment
flyway-ant
Flyway Ant tasks
Stars: ✭ 14 (-88.62%)
Mutual labels:  continuous-delivery, continuous-deployment, database-migrations
Flagsmith Frontend
Web App and Mobile App for Flagsmith
Stars: ✭ 86 (-30.08%)
Mutual labels:  continuous-delivery, continuous-deployment
Laravel Cadillac
🍺 A database tool for laravel.
Stars: ✭ 63 (-48.78%)
Mutual labels:  database, tool
Buddy Cli
CLI tool for Buddy Cloud
Stars: ✭ 69 (-43.9%)
Mutual labels:  continuous-delivery, continuous-deployment
Git Push Deploy
Simple Automated CI/CD Pipeline for GitHub and GitLab Projects
Stars: ✭ 21 (-82.93%)
Mutual labels:  continuous-delivery, continuous-deployment
Ecs Nginx Proxy
Reverse proxy for AWS ECS. Lets you address your docker containers by sub domain.
Stars: ✭ 93 (-24.39%)
Mutual labels:  continuous-delivery, continuous-deployment
Docker For All
Docker applied in development, devops, testing, product management etc.
Stars: ✭ 88 (-28.46%)
Mutual labels:  continuous-delivery, continuous-deployment
Go Mygen
Quickly generate CURD and documentation for operating MYSQL.etc
Stars: ✭ 94 (-23.58%)
Mutual labels:  database, tool
Github Slug Action
GitHub Action to expose slug value of GitHub environment variables inside your GitHub workflow
Stars: ✭ 96 (-21.95%)
Mutual labels:  continuous-delivery, continuous-deployment
Lol dba
lol_dba is a small package of rake tasks that scan your application models and displays a list of columns that probably should be indexed. Also, it can generate .sql migration scripts.
Stars: ✭ 1,363 (+1008.13%)
Mutual labels:  database-migrations, database
Origin
Conformance test suite for OpenShift
Stars: ✭ 8,046 (+6441.46%)
Mutual labels:  continuous-delivery, continuous-deployment
Piplin
📤 An open source self-hosted continuous integration and deployment system - QQ群: 656868
Stars: ✭ 1,044 (+748.78%)
Mutual labels:  continuous-delivery, continuous-deployment
Dyn365 Ce Devops
DevOps for Dynamics 365 Customer Engagement (CE) is becoming a popular topic. The goal of this project is to help Dynamics 365 CE solution builders understand and accelerate their implementation of DevOps practices with Dynamics CE and VSTS.
Stars: ✭ 82 (-33.33%)
Mutual labels:  continuous-delivery, continuous-deployment
Spinnaker
Spinnaker is an open source, multi-cloud continuous delivery platform for releasing software changes with high velocity and confidence.
Stars: ✭ 8,215 (+6578.86%)
Mutual labels:  continuous-delivery, continuous-deployment
Laravel Sync Migration
Developer tool helps to sync migrations without refreshing the database
Stars: ✭ 89 (-27.64%)
Mutual labels:  database-migrations, database
Pipelines
Build pipelines for automation, deployment, testing...
Stars: ✭ 105 (-14.63%)
Mutual labels:  continuous-delivery, continuous-deployment
Lightning Sites
☁️ Lightning deployment for your ~/Sites folders
Stars: ✭ 8 (-93.5%)
Mutual labels:  continuous-delivery, continuous-deployment
Express Knex Objection
A simple API system on a pg database, using knex and objection to simplify connection and management
Stars: ✭ 20 (-83.74%)
Mutual labels:  database-migrations, database

Official Flyway Docker images

Docker Auto Build

This is the official repository for Flyway Command-line images.

Which image should I use?

There are two families of images:

  • flyway/flyway - this image is the basic Flyway command line application, and should be your default choice.
  • flyway/flyway-azure - this image is suitable for use in Azure Pipelines agent jobs.

Supported Tags

The following tags are officially supported:

The flyway-azure image only supports alpine versions.

Supported Volumes

To make it easy to run Flyway the way you want to, the following volumes are supported:

Volume Usage
/flyway/conf Directory containing a flyway.conf configuration file
/flyway/drivers Directory containing the JDBC driver for your database
/flyway/sql The SQL files that you want Flyway to use (for SQL-based migrations)
/flyway/jars The jars files that you want Flyway to use (for Java-based migrations)

Flyway Edition

You can switch between the various Flyway editions by setting the FLYWAY_EDITION environment variable to any of the following values:

Value Description
community Select the Flyway Community Edition (default)
pro Select the Flyway Pro (v6) Edition
enterprise Select the Flyway Enterprise (v6) / Teams (v7) Edition

Getting started

The easiest way to get started is simply to test the default image by running

docker run --rm flyway/flyway

This will give you Flyway Command-line's usage instructions.

To do anything useful however, you must pass the arguments that you need to the image. For example:

docker run --rm flyway/flyway -url=jdbc:h2:mem:test -user=sa info

Note that the syntax for flyway/flyway-azure is slightly different in order to be compatible with Azure Pipelines agent job requirements. As it does not define an entrypoint, you need to explicitly add the flyway command. For example:

docker run --rm flyway/flyway-azure:latest-alpine flyway

Adding SQL files

To add your own SQL files, place them in a directory and mount it as the flyway/sql volume.

Example

Create a new directory and add a file named V1__Initial.sql with following contents:

CREATE TABLE MyTable (
    MyColumn VARCHAR(100) NOT NULL
);

Now run the image with the volume mapped:

docker run --rm -v /absolute/path/to/my/sqldir:/flyway/sql flyway/flyway -url=jdbc:h2:mem:test -user=sa migrate

Adding a config file

If you prefer to store those arguments in a config file you can also do so using the flyway/conf volume.

Example

Create a file named flyway.conf with the following contents:

flyway.url=jdbc:h2:mem:test
flyway.user=sa

Now run the image with that volume mapped as well:

docker run --rm -v /absolute/path/to/my/sqldir:/flyway/sql -v /absolute/path/to/my/confdir:/flyway/conf flyway/flyway migrate

Adding a JDBC driver

Flyway ships by default with drivers for

  • Aurora MySQL
  • Aurora PostgreSQL
  • CockroachDB
  • Derby
  • Firebird
  • H2
  • HSQLDB
  • MariaDB
  • MySQL
  • Percona XtraDB Cluster
  • PostgreSQL
  • SQL Server
  • SQLite
  • Sybase ASE

If your database is not in this list, or if you want to ship a different or newer driver than the one included you can do so using the flyway/drivers volume.

Example

Create a directory and drop for example the Oracle JDBC driver (ojdbc8.jar) in there.

You can now let Flyway make use of it my mapping that volume as well:

docker run --rm -v /absolute/path/to/my/sqldir:/flyway/sql -v /absolute/path/to/my/confdir:/flyway/conf -v /absolute/path/to/my/driverdir:/flyway/drivers flyway/flyway migrate

Adding Java-based migrations and callbacks

To pass in Java-based migrations and callbacks you can use the flyway/jars volume.

Example

Create a directory and drop for a jar with your Java-based migrations in there.

You can now let Flyway make use of it my mapping that volume as well:

docker run --rm -v /absolute/path/to/my/sqldir:/flyway/sql -v /absolute/path/to/my/confdir:/flyway/conf -v /absolute/path/to/my/jardir:/flyway/jars flyway/flyway migrate

Docker Compose

To run both Flyway and the database that will be migrated in containers, you can use a docker-compose.yml file that starts and links both containers.

Example

version: '3'
services:
  flyway:
    image: flyway/flyway
    command: -url=jdbc:mysql://db -schemas=myschema -user=root [email protected] -connectRetries=60 migrate
    volumes:
      - .:/flyway/sql
    depends_on:
      - db
  db:
    image: mysql
    environment:
      - [email protected]
    command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
    ports:
      - 3306:3306

Run docker-compose up, this will start both Flyway and MySQL. Flyway will automatically wait for up to one minute for MySQL to be initialized before it begins to migrate the database.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].