Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version: '3'
- # Docker image based on 'tomcat:8-jre8-alpine'
- my-server:
- image: my-server:local
- ports:
- - 8081:8080
- depends_on:
- - flyway
- command: bash -c "while ping -c1 flyway &>/dev/null; do sleep 1; echo 'Waiting migration ends!'; done; catalina.sh run"
- flyway:
- image: boxfuse/flyway:5.2.4
- volumes:
- - $PWD/my-server/etc/db/sql:/flyway/sql
- - $PWD/my-server/etc/db/conf/flyway.conf:/flyway/conf/flyway.conf
- command: -url=jdbc:mysql://database/${MY_DB:-mydb} -user=${MYSQL_USER:-root} -password=${MYSQL_ROOT_PASSWORD:-root} -connectRetries=60 migrate
- depends_on:
- - database
- database:
- image: mysql:8.0.16
- environment:
- - MYSQL_DATABASE=${MY_DB:-mydb}
- - MYSQL_USER=${MYSQL_USER:-root}
- - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-root}
- ports:
- - 3306:3306
- security_opt:
- - seccomp=unconfined
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement