After switching to main branch, I decided to start fresh and removed everything since my branch diverged quite a lot.
I run the commands that I introduced in make clean.
Then calling make install failed with:
docker-compose exec php sh -c 'composer install'
Composer could not find a composer.json file in /var/www/html
To initialize a project, please create a composer.json file. See https://getcomposer.org/basic-usage
After rebuilding the cached docker images, another error showed up running docker-compose exec php sh -c 'php artisan key:generate'
[2022-03-12 15:16:19] local.ERROR: file_get_contents(/var/www/.env): failed to open stream: No such file or directory {"exception":"[object] (ErrorException(code: 0): file_get_contents(/var/www/.env): failed to open stream: No such file or directory at /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Console/KeyGenerateCommand.php:96)
It turns out, that the volume was mounted on /var/html after #238 but the workdir was expected to be in /var/www.
What does it fix?
Fixes make install and introduces a new make command to start from a fresh checkout (useful when upstream diverged a lot from your own branch).
After switching to
main
branch, I decided to start fresh and removed everything since my branch diverged quite a lot.I run the commands that I introduced in
make clean
.Then calling
make install
failed with:After rebuilding the cached docker images, another error showed up running
docker-compose exec php sh -c 'php artisan key:generate'
It turns out, that the volume was mounted on
/var/html
after #238 but the workdir was expected to be in/var/www
.What does it fix?
Fixes
make install
and introduces a new make command to start from a fresh checkout (useful when upstream diverged a lot from your own branch).How has it been tested?
You can reproduce the error by:
git checkout fix-install~
make clean
make install
Then to confirm the fix you need to:
git checkout fix-install
make clean
make install