{"id":17984427,"url":"https://github.com/adoyle-h/docker-flyway","last_synced_at":"2026-04-29T19:33:23.807Z","repository":{"id":149887311,"uuid":"98430767","full_name":"adoyle-h/docker-flyway","owner":"adoyle-h","description":"A docker image for flyway command-line tool.","archived":false,"fork":false,"pushed_at":"2017-08-02T01:31:17.000Z","size":17,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-18T10:53:44.679Z","etag":null,"topics":["docker-image","flyway"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/adoyle-h.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},"funding":{"patreon":"adoyle_h","liberapay":"adoyle","custom":["https://media.githubusercontent.com/media/adoyle-h/_imgs/master/sponsor.png"]}},"created_at":"2017-07-26T14:15:51.000Z","updated_at":"2019-07-02T14:09:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"564e5852-e43c-40c0-adda-80e72f65ade0","html_url":"https://github.com/adoyle-h/docker-flyway","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/adoyle-h/docker-flyway","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adoyle-h%2Fdocker-flyway","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adoyle-h%2Fdocker-flyway/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adoyle-h%2Fdocker-flyway/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adoyle-h%2Fdocker-flyway/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adoyle-h","download_url":"https://codeload.github.com/adoyle-h/docker-flyway/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adoyle-h%2Fdocker-flyway/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32441133,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T18:12:22.909Z","status":"ssl_error","status_checked_at":"2026-04-29T18:11:33.322Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["docker-image","flyway"],"created_at":"2024-10-29T18:21:19.908Z","updated_at":"2026-04-29T19:33:23.792Z","avatar_url":"https://github.com/adoyle-h.png","language":"Shell","funding_links":["https://patreon.com/adoyle_h","https://liberapay.com/adoyle","https://media.githubusercontent.com/media/adoyle-h/_imgs/master/sponsor.png"],"categories":[],"sub_categories":[],"readme":"# docker-flyway\n\nA docker image for [flyway][] [command-line tool](https://flywaydb.org/documentation/commandline/).\n\nThe image integrates with [wait-for-it][] script, because docker-compose does not wait for\ndependency container *available*. Refer to the article \"[Controlling startup order in Compose][]\".\n\n\n## TOC\n\n\u003c!-- MarkdownTOC GFM --\u003e\n\n- [Build Image](#build-image)\n- [Run Container](#run-container)\n    - [Entrypoint](#entrypoint)\n    - [Command](#command)\n- [Environments](#environments)\n- [flyway.conf](#flywayconf)\n- [Migration Files](#migration-files)\n- [Debug](#debug)\n- [Copyright and License](#copyright-and-license)\n\n\u003c!-- /MarkdownTOC --\u003e\n\n## Build Image\n\n`docker build --build-arg FLYWAY_VERSION=4.2.0 -t \u003cimage-name:tag\u003e .`\n\nThe build argument `FLYWAY_VERSION` is optional, which defaults to 4.2.0.\n\n## Run Container\n\nRefer to the [`docker-compose.yml`](./docker-compose.yml).\n\nExecute `docker-compose up`.\n\n### Entrypoint\n\nThe `ENTRYPOINT` locates at `/opt/bin/entrypoint.sh`. You could change the default behaviors by mounting your `entrypoint.sh` file, or use `--entrypoint` option with `docker` command.\n\n### Command\n\nThe `CMD` locates at `/opt/bin/cmd.sh`. You could change the default behaviors by mounting your `cmd.sh` file, or overwrite it with `docker` command.\n\nUse [`docker-compose.yml`](./docker-compose.yml) for example: `docker-compose run flyway flyway info`\n\n`flyway` could be referenced in `$PATH`.\n\n\n## Environments\n\n- Required\n    - DB_HOST\n    - DB_PORT\n    - DB_USER\n    - DB_PWD\n    - DATABASE\n    - WAIT_HOST: Same to `DB_HOST` in general\n    - WAIT_PORT: Same to `DB_PORT` in general\n- Optional\n    - url: Defaults to `jdbc:mysql://\"$DB_HOST\":\"$DB_PORT\"/\"$DATABASE\"`\n    - locations: Defaults to `filesystem:$SQL_DIR,classpath:$JAVA_DIR`\n        - SQL_DIR: Defaults to `/home/app/sql`\n        - JAVA_DIR: Defaults to `/home/app/java`\n    - WAIT_OPTS: Defaults to `-s`. More options refer to [wait-for-it][]\n    - WAIT_TIMEOUT: Defaults to `30`, count in seconds.\n\nYou can set these environment variables via `docker run -e`.\n\n## flyway.conf\n\nThe default flyway.conf is [here](./src/flyway.conf). **It change the flyway default behaviors**.\n\nYou could mount yours on `/home/app/src/flyway.conf`.\n\n## Migration Files\n\nYou should mount your migration files on `/home/app/sql` for SQL migrations and `/home/app/java` for Java migrations.\n\n## Debug\n\n`docker-compose run --rm flyway /bin/bash`\n\n\n## Copyright and License\n\nCopyright (c) 2017 ADoyle. The project is licensed under the **Apache License Version 2.0**.\n\nSee the [LICENSE][] file for the specific language governing permissions and limitations under the License.\n\nSee the [NOTICE][] file distributed with this work for additional information regarding copyright ownership.\n\n\n\u003c!-- Links --\u003e\n\n[LICENSE]: ./LICENSE\n[NOTICE]: ./NOTICE\n\n\u003c!-- links --\u003e\n\n[flyway]: https://github.com/flyway/flyway\n[wait-for-it]: https://github.com/vishnubob/wait-for-it\n[Controlling startup order in Compose]: https://docs.docker.com/compose/startup-order/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadoyle-h%2Fdocker-flyway","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadoyle-h%2Fdocker-flyway","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadoyle-h%2Fdocker-flyway/lists"}