tarampampam / laravel-roadrunner-in-docker

:rocket: An example of Laravel app that runs in a docker container with RoadRunner
MIT License
178 stars 35 forks source link

Error after command "make install" #221

Closed VITEK-THE-BEST closed 1 year ago

VITEK-THE-BEST commented 1 year ago

just cloning the repository $ git clone https://github.com/tarampampam/laravel-roadrunner-in-docker.git then I enter the command $ make install I get the following error

In JsonFile.php line 178:

  file_put_contents(./composer.lock): Failed to open stream: Permission denied  

...

ERROR: 1
make: *** [Makefile:17: install] Ошибка 1

then I enter the command $ composer i and run again $ make install and i get this problem

In StreamHandler.php line 146:

  The stream or file "/app/storage/logs/laravel.log" could not be opened in append mode: Failed to open stream: Permission denied                                                  
  The exception occurred while attempting to log: The stream or file "/app/storage/logs/laravel.log" could not be opened in append mode: Failed to open stream: Permission denied  
  The exception occurred while attempting to log: The /app/bootstrap/cache directory must be present and writable.                                                                 
  Context: {"exception":{}}                                                                                                                                                        
  Context: {"exception":{}}                                                                                                                                                        

i am using Fedora 37

VITEK-THE-BEST commented 1 year ago

after command make init i have that problem image

but i get this

$ make up
...

    Navigate your browser to ⇒ http://127.0.0.1:8080 or https://127.0.0.1:8443

and I followed the link, and the page is unavailable. Maybe I have not configured something. Maybe it is necessary to create an env file? I'm new user to docker...

tarampampam commented 1 year ago

Could you try again with a fresh installation? I can't reproduce the described error on my side:

$ git clone https://github.com/tarampampam/laravel-roadrunner-in-docker.git
Cloning into 'laravel-roadrunner-in-docker'...
remote: Enumerating objects: 949, done.
remote: Counting objects: 100% (492/492), done.
remote: Compressing objects: 100% (284/284), done.
remote: Total 949 (delta 445), reused 233 (delta 207), pack-reused 457
Receiving objects: 100% (949/949), 279.80 KiB | 1.50 MiB/s, done.
Resolving deltas: 100% (532/532), done.

$ cd laravel-roadrunner-in-docker/

$ make install 
docker-compose run --rm --user "1000:1000" --no-deps app composer install --ansi --prefer-dist
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Nothing to install, update or remove
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

   INFO  Discovering packages.  

  fruitcake/laravel-cors ...................................................................................................................... DONE
  laravel/sail ................................................................................................................................ DONE
  laravel/sanctum ............................................................................................................................. DONE
  laravel/tinker .............................................................................................................................. DONE
  nesbot/carbon ............................................................................................................................... DONE
  nunomaduro/collision ........................................................................................................................ DONE
  nunomaduro/termwind ......................................................................................................................... DONE
  spatie/laravel-ignition ..................................................................................................................... DONE
  spiral/roadrunner-laravel ................................................................................................................... DONE

$ make init
...
docker-compose run --rm --user "1000:1000" app php ./artisan migrate --force --seed
  2019_08_19_000000_create_failed_jobs_table ............................................................................................. 14ms DONE
  2019_12_14_000001_create_personal_access_tokens_table .................................................................................. 17ms DONE

   INFO  Seeding database.  

docker-compose run --rm --user "1000:1000" --no-deps app php ./artisan storage:link

   INFO  The [public/storage] link has been connected to [storagepublic].
VITEK-THE-BEST commented 1 year ago

I sincerely apologize. this is my local problem. Apparently I installed docker incorrectly. Solved the problem like this:

That helped me at Fedora 37 Docker version 20.10.21, build baeda1f docker-compose version 1.29.2, build unknown