I have following docker compose file:
version: '3'
services:
my_sql_conatainer_name:
image: percona:latest
container_name: my_sql_conatainer_name
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: secret
ports:
- "3306:3306"
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
timeout: 20s
retries: 10
migration:
image: boxfuse/flyway:latest
container_name: flyway_migration
volumes:
- ./flyway_scripts/src/main/resources/db/migration:/flyway/sql
command: ["./wait-for-it.sh", "mysql:3306", "--", "migrate", "-url=jdbc:mysql://my_sql_conatainer_name:3306/secret?useUnicode=true&characterEncoding=utf8&useSSL=false", "-user=root", "-password=password"]
wait-for-it.sh file locates near the compose file
When I up I see following error:
flyway_migration | ERROR: Invalid argument: ./wait-for-it.sh
What do I wrong?