Giter VIP home page Giter VIP logo

Comments (6)

schmunk42 avatar schmunk42 commented on August 15, 2024 2

Could you try mounting your project to /app

 - ./:/app:delegated

Related: yiisoft/yii2-app-advanced#250

from yii2-docker.

schmunk42 avatar schmunk42 commented on August 15, 2024 1

I just recalled, that I did not modify the default Apache config for the PHP-Docker image. But you could load a custom configuration.

Or add something like this to your Dockerfile - DO NOT RUN THIS AS A COMMAND ON YOUR MACHINE

# Create a symlink for apache (if `/var/www/html` is available)
RUN rm -rf /var/www/html && ln -s /backend/web/ /var/www/html || true

from https://github.com/yiisoft/yii2-docker/blob/master/php/Dockerfile-debian#L96-L97

It should be safe, since it only removes and creates a link during docker-compose build. The idea is to link /backend/web to Apache's DocumentRoot.


[update] Please see PR below from advanced app, it should work.

from yii2-docker.

Chienle avatar Chienle commented on August 15, 2024

thank for answer! I have update volumes below and got same result:

volumes:
      - ~/.composer-docker/cache:/root/.composer/cache:delegated
      - ./:/app:delegated

from yii2-docker.

Chienle avatar Chienle commented on August 15, 2024

I got it, thank your for save time to me!

from yii2-docker.

temirfe avatar temirfe commented on August 15, 2024

I have same problem and I'm a little bit confused.
So if WORKDIR is /app then all web files will be located in /app but not in /var/www/html?

from yii2-docker.

schmunk42 avatar schmunk42 commented on August 15, 2024

WORKDIR is the working directory when running commands in the container, eg. bash it's not directly related to web files.

from yii2-docker.

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.