Skip to content

Commit

Permalink
Merge pull request #16 from php-openapi/15-remove-unnecessary-command…
Browse files Browse the repository at this point in the history
…-from-makefile

Resolve: Remove unnecessary command from Makefile
  • Loading branch information
cebe authored Nov 12, 2024
2 parents 6e41c29 + 9380c43 commit 65d9146
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@ up:
echo "Waiting for mariadb to start up..."
docker-compose exec -T mysql timeout 60s sh -c "while ! (mysql -udbuser -pdbpass -h maria --execute 'SELECT 1;' > /dev/null 2>&1); do echo -n '.'; sleep 0.1 ; done; echo 'ok'" || (docker-compose ps; docker-compose logs; exit 1)

# Solution to problem https://stackoverflow.com/questions/50026939/php-mysqli-connect-authentication-method-unknown-to-the-client-caching-sha2-pa
# if updated to PHP 7.4 or more, this command is not needed (TODO)
docker-compose exec -T mysql timeout 60s sh -c "while ! (mysql --execute \"ALTER USER 'dbuser'@'%' IDENTIFIED WITH mysql_native_password BY 'dbpass';\" > /dev/null 2>&1); do echo -n '.'; sleep 0.1 ; done; echo 'ok'" || (docker-compose ps; docker-compose logs; exit 1)
echo "Waiting for Mysql to start up..."
docker-compose exec -T mysql timeout 60s sh -c "while ! (mysql -udbuser -pdbpass -h mysql --execute 'SELECT 1;' > /dev/null 2>&1); do echo -n '.'; sleep 0.1 ; done; echo 'ok'" || (docker-compose ps; docker-compose logs; exit 1)

cli:
docker-compose exec --user=$(UID) php bash
Expand Down

0 comments on commit 65d9146

Please sign in to comment.