From 1079f15dd44d606a53b942369835879102ec4c8f Mon Sep 17 00:00:00 2001 From: LukasRos Date: Thu, 22 Aug 2024 16:58:39 +0200 Subject: [PATCH] feat: Shell script for initializing sail --- .gitignore | 1 + sail-init.sh | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 sail-init.sh diff --git a/.gitignore b/.gitignore index 860a9b14c2e..1e29460beeb 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,4 @@ npm-debug.log .phpunit.result.cache yarn-error.log monica.db +sail \ No newline at end of file diff --git a/sail-init.sh b/sail-init.sh new file mode 100644 index 00000000000..1b2ca182ced --- /dev/null +++ b/sail-init.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# +# Run this script after first cloning the repository to be ready to use the sail command. +# +# taken from https://laravel.com/docs/11.x/sail#installing-composer-dependencies-for-existing-projects +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 +ln -s ./vendor/bin/sail sail \ No newline at end of file