Hey,
I am trying to load the schema.sql file into the mysql service but it seems that mysql is not ready at that time. i am not even sure if it's available since it's running on a separate docker as it seems.
What's the best solution for this to be able to load the sql schema?
Thank You.
image: edbizarro/bitbucket-pipelines-php7
pipelines:
default:
- step:
caches:
- composer
services:
- redis
- mysql
script:
- cp .env.build .env
- mysql -u root -proot -f avncms < database/schema/schema.sql
- composer install --no-interaction --no-progress --prefer-dist --no-scripts
- php artisan tools:deploy --no-interaction
- yarn
- vendor/bin/phpunit
definitions:
services:
redis:
image:
redis
mysql:
image:
mysql
environment:
MYSQL_ROOT_PASSWORD: 'root'
MYSQL_DATABASE: 'avncms'
MYSQL_RANDOM_ROOT_PASSWORD: 'no'
MYSQL_USER: 'test_user'
MYSQL_PASSWORD: 'test_user_password'