Created
          August 21, 2018 08:33 
        
      - 
      
- 
        Save MKagesawa/4b265a5441bab67c8d54033d415a37fc to your computer and use it in GitHub Desktop. 
    Docker Compose MySQL DB and Flyway Migrate
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | 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