How to setup and run laravel, from git?

  git, laravel, php

Either I miss something, or the whole chain lacks something.

Here’s my assumption:

The whole point of containerization in development, is to reduce the cost of environment setup, and create a prepared image with all the required pieces.

So, when I read that Laravel Sail is installing laravel via containerization, I get excited. Thus I install it via their instructions, and everything works.

Then the problem begins. Because:

  • After a successful installation, I create a git repo, with GitHub’s default laravel .gitignore
  • Then I push the newly installed laravel app into my git repo.
  • Then I ask a developer to start developing it. Please note that:
    • He does not have PHP installed
    • He does not have Composer installed
  • He clonse the repo, and as per installation guide, runs ./vendor/bin/sail up
  • But ./vender folder is correctly excluded in .gitignore
  • Thus his command results in:

bash: ./vendor/bin/sail: No such file or directory

  • He Googles it of course, and finds out that people suggest to run composer update
  • He goes to install composer, then before that PHP, then all extensoins of PHP, then …

Do I miss something here? The whole point of containerization was to not install the required environment locally.

What is the proper way of running a laravel app, that is not installed from https://laravel.build, but is cloned from a git repo, WITHOUT having PHP or Composer installed locally?

Source: Laravel

Leave a Reply