-
-
Save wffranco/e6974f80ed4703ff45c540637a2c66a5 to your computer and use it in GitHub Desktop.
Revisions
-
wffranco revised this gist
Jul 19, 2024 . No changes.There are no files selected for viewing
-
wffranco revised this gist
Jul 19, 2024 . 1 changed file with 20 additions and 11 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,17 +2,26 @@ cd "$(dirname "${BASH_SOURCE[0]}")" if [ ! -e ./vendor ]; then docker run --rm \ -u "$(id -u):$(id -g)" \ -v "$(pwd):/var/www/html" \ -w /var/www/html \ laravelsail/php83-composer:latest \ composer install --ignore-platform-reqs fi if [ ! -f .env ]; then cp .env.example .env ./sail artisan key:generate fi # if the first argument is "in:*", use it as service name, setting the APP_SERVICE environment variable # example of usage: sail in:mysql mysql -u root -p # useful if you use extra or non-default services in your docker-compose.yml if [[ $1 == in:* ]]; then export APP_SERVICE=${1:3} shift fi ./vendor/bin/sail $@ -
wffranco created this gist
May 22, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ #!/usr/bin/env bash cd "$(dirname "${BASH_SOURCE[0]}")" #if the command is called with `init` param, or `vendor` folder is missing if [ "$1" = "init" ] || [ ! -d vendor ]; then #run laravel sail container to run `composer install` docker run --rm \ -u "$(id -u):$(id -g)" \ -v $(pwd):/var/www/html \ -w /var/www/html \ laravelsail/php81-composer:latest \ composer install --ignore-platform-reqs fi if [ "$1" != "init" ]; then ./vendor/bin/sail $@ fi