I've tried use your repo for use with laravel iun a project with 5 databases
The best way for me (I spend some time in try o anothers ways) is add this:
On my project in gitlab add variables for second database
But problem when is not mysql client for connect from alpine image to mysql container. I've tried use my own image of mysql and official
db-seeding:
stage: building
services:
- {name: 'abkrim/mysql8_legacy_password', alias: 'mysql'}
image: abkrim/gitlab-ci-pipeline-php:7.3-alpine
dependencies:
- composer
- yarn
script:
- echo "CREATE DATABASE IF NOT EXISTS \`${DB_2}\`;" | mysql --user=root --password="MYSQL_ROOT_PASSWORD" --host=mysql
- echo "CREATE USER '${DB_2_USER}'@'%' IDENTIFIED BY '${DB_2_PASSWORD}';" | mysql --user=root --password="MYSQL_ROOT_PASSWORD" --host=mysql
- echo "GRANT ALL ON ${DB_2}.* TO '${DB_2_USER}'@'%';" | mysql --user=root --password="MYSQL_ROOT_PASSWORD" --host=mysql
- echo "FLUSH PRIVILEGES;" | mysql --user=root --password="MYSQL_ROOT_PASSWORD" --host=mysql
- php artisan migrate:fresh --seed
I've tried use your repo for use with laravel iun a project with 5 databases
The best way for me (I spend some time in try o anothers ways) is add this:
On my project in gitlab add variables for second database But problem when is not mysql client for connect from alpine image to mysql container. I've tried use my own image of mysql and official
On gitlab access to image of alpine and see error
After install manual mysql-client of mysql instead mariadb-client command is correct.
I've tried create a form image on hub.docker, but I not a expert on docker....