{"id":16626955,"url":"https://github.com/flyway/flyway-docker","last_synced_at":"2025-05-16T12:09:40.502Z","repository":{"id":38325456,"uuid":"113077463","full_name":"flyway/flyway-docker","owner":"flyway","description":"Official Flyway Docker images","archived":false,"fork":false,"pushed_at":"2024-10-24T13:32:18.000Z","size":276,"stargazers_count":212,"open_issues_count":17,"forks_count":82,"subscribers_count":8,"default_branch":"main","last_synced_at":"2024-10-25T08:59:26.477Z","etag":null,"topics":["continuous-delivery","continuous-deployment","database","database-migrations","docker","flyway","tool"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flyway.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-04T18:10:01.000Z","updated_at":"2024-10-24T13:32:22.000Z","dependencies_parsed_at":"2023-02-04T02:18:25.283Z","dependency_job_id":"0bffb171-e5eb-41e2-a740-3bd43108e162","html_url":"https://github.com/flyway/flyway-docker","commit_stats":null,"previous_names":[],"tags_count":191,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flyway%2Fflyway-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flyway%2Fflyway-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flyway%2Fflyway-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flyway%2Fflyway-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flyway","download_url":"https://codeload.github.com/flyway/flyway-docker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246777832,"owners_count":20832032,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["continuous-delivery","continuous-deployment","database","database-migrations","docker","flyway","tool"],"created_at":"2024-10-12T04:12:42.909Z","updated_at":"2025-04-02T09:01:41.009Z","avatar_url":"https://github.com/flyway.png","language":"Python","readme":"# Flyway Open Source Docker images\n\nThis is the repository for [Flyway Command-line⁠](https://documentation.red-gate.com/fd/welcome-to-flyway-184127914.html) Open Source images. \n\nFor the officially certified Redgate Flyway Docker images, use [Redgate/Flyway](https://hub.docker.com/r/redgate/flyway/) on Dockerhub, which works across the complete range of Flyway editions, including Community, Teams and Enterprise.\n\n[Redgate/Flyway](https://hub.docker.com/r/redgate/flyway/) also provides compatibility with [Flyway Pipelines](https://flyway.red-gate.com/pipelines). Flyway Pipelines will help you gain centralized visibility of the state of your database deployments across projects so you can see what has been deployed, when and where for easy tracking.\n\n## Suggested Project Structure\n\nTo make it easy to run Flyway the way you want to, you can use the following folders in your Flyway project\n\nVolume            | Usage\n------------------|------\n`/flyway/conf`    | Directory containing a `flyway.conf/toml` [configuration file](https://documentation.red-gate.com/fd/configuration-files-224003079.html)\n`/flyway/drivers` | Directory containing the [JDBC driver for your database](https://documentation.red-gate.com/fd/command-line-184127404.html#jdbc-drivers)\n`/flyway/sql`     | The SQL files that you want Flyway to use (for [SQL-based migrations](https://documentation.red-gate.com/fd/migrations-184127470.html#sql-based-migrations))\n`/flyway/jars`    | The jars files that you want Flyway to use (for [Java-based migrations](https://documentation.red-gate.com/fd/migrations-184127470.html#java-based-migrations))\n\n## Getting started\n\nThe easiest way to get started is simply to test the default image by running\n\n`docker run --rm flyway/flyway`\n\nThis will give you Flyway Command-line's usage instructions.\n\nTo do anything useful however, you must pass the arguments that you need to the image. For example:\n\n`docker run --rm flyway/flyway -url=jdbc:sqlite:dev.db info`\n\nNote that the syntax for **flyway/flyway:\\*-azure** is slightly different in order to be compatible with Azure Pipelines\nagent job requirements. As it does not define an entrypoint, you need to explicitly add the `flyway` command. For example:\n\n`docker run --rm flyway/flyway:latest-azure flyway`\n\n## Adding SQL files\n\nTo add your own SQL files, place them in a directory, mount it and point flyway at it using the [`workingDirectory`](https://documentation.red-gate.com/fd/working-directory-224919763.html) parameter.\n\n### Example\n\nCreate a new `/sql` directory in your project folder and add a file named `V1__Initial.sql` with following contents:\n\n```sql\nCREATE TABLE MyTable (\n    MyColumn VARCHAR(100) NOT NULL\n);\n```\n\nNow run the image with the volume mapped:\n\n`docker run --rm -v /absolute/path/to/my/project_folder:/flyway/project flyway/flyway -url=jdbc:sqlite:dev.db -workingDirectory=\"project\" migrate`\n\n## Adding a config file\n\nIf you prefer to store arguments in a config file you can put that in your project folder.\n\n### Example\n\nCreate a file named `flyway.toml` with the following contents:\n\n```\n[environments.development]\nurl = \"jdbc:sqlite:/flyway/project/dev.db\"\nuser= \"admin\"\npassword = \"password1\"\n\n[flyway]\nenvironment = \"development\"\n```\n\nNow run the image with that volume mapped as well:\n\n`docker run --rm -v /absolute/path/to/my/project_folder:/flyway/project flyway/flyway migrate -workingDirectory=\"project\"`\n\n## Adding a JDBC driver\n\nIf your database driver is not shipped by default (you can check the [official documentation here](https://documentation.red-gate.com/fd/supported-databases-184127454.html) to see if it is), or if you want to use a different or newer driver than the one included you can create a  `drivers/` folder in your project folder.\n\n## Adding Java-based migrations and callbacks\n\nTo pass in Java-based migrations and callbacks you can use a `jars/` folder in your project directory and place them in there.\n\n## Docker Compose\n\nTo run both Flyway and the database that will be migrated in containers, you can use a `docker-compose.yml` file that\nstarts and links both containers.\n\n### Example\n\n```\nversion: '3'\nservices:\n  flyway:\n    image: flyway/flyway\n    command: -url=jdbc:mysql://db -schemas=myschema -user=root -password=P@ssw0rd -connectRetries=60 migrate\n    volumes:\n      - .:/flyway/sql\n    depends_on:\n      - db\n  db:\n    image: mysql\n    environment:\n      - MYSQL_ROOT_PASSWORD=P@ssw0rd\n    command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci\n    ports:\n      - 3306:3306\n```\n\nRun `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.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflyway%2Fflyway-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflyway%2Fflyway-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflyway%2Fflyway-docker/lists"}