Skip to content

Instantly share code, notes, and snippets.

@MKagesawa
Created August 21, 2018 08:33
Show Gist options
  • Save MKagesawa/4b265a5441bab67c8d54033d415a37fc to your computer and use it in GitHub Desktop.
Save MKagesawa/4b265a5441bab67c8d54033d415a37fc to your computer and use it in GitHub Desktop.
Docker Compose MySQL DB and Flyway Migrate
version: '3'
services:
flyway:
image:
entrypoint:
dockerize -wait tcp://mydb:3306 -timeout 60s
command:
sh -c "
flyway -url=jdbc:mysql://mydb:3306?characterEncoding=UTF-8 -user=root -password= migrate
"
depends_on:
- db
db:
image: mysql:5.6
container_name: mydb
environment:
- MYSQL_USER=root
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
ports:
- 3306:3306
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment