Git Product home page Git Product logo

Comments (5)

dimadeush avatar dimadeush commented on July 22, 2024

Hello
Please try to use next docker-compose.yml path mapping:
1)Nginx - ./:/var/www/html:ro,cached
2)Laravel - ./:/var/www/html:cached

And inform us if it helps

from docker-nginx-php-laravel.

stavrosfa avatar stavrosfa commented on July 22, 2024

Hi, thanks for the swift response, but no, this doesn't seem to have any effect.
Although, I found that if I set

1)Nginx - ./:/var/www/html/random-folder:ro,cached
2)Laravel - ./:/var/www/html/random-folder:cached

then all the files are copied in the /html folder (supposedly correctly so + correct permissions according to Dockerfile, www-data:www-data) + html/random-folder/docker (root:root) + html/random-folder/mysql-data(root:root) in the Laravel container, but still the same as before in the nginx container (root:root).

I am not quite sure what to make of this, or how to get around it..

from docker-nginx-php-laravel.

dimadeush avatar dimadeush commented on July 22, 2024

First of all please follow recommendations from the docker-compose Team - docker/compose#9814
Make sure that you don't have other changes on your local docker-nginx-php-laravel
Please provide more info about the error that you have now

from docker-nginx-php-laravel.

stavrosfa avatar stavrosfa commented on July 22, 2024

I followed everything I could find, but the only thing that helped eventually was to go in Docker Desktop, in resources and manually add /var/www/html as a folder sharing location. This solved the problem of files not getting copied over.
I still can't run make composer-install (I can composer install inside the container) or make env-dev (but I can cp .env.dev .env inside the container). Even After I do that I get a 502 from Nginx. The permissions also don't seem to be correct, everything is root:root.
I run the same thing on my work mac and it just took 10 minutes to download everything but is working out of the box as intended. This has definitely something to do with Linux permissions, so I guess this issue can be closed as it was about file sharing between host and containers.

from docker-nginx-php-laravel.

dimadeush avatar dimadeush commented on July 22, 2024

Please make sure that you are not logged in as a root user on your Linux. Try to create additional user and check once again.

from docker-nginx-php-laravel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.