dunglas / frankenphp-drupal

Drupal on FrankenPHP
67 stars 9 forks source link

How to expose the source code inside the docker container to the host? #28

Open HuyNguyen206 opened 6 months ago

HuyNguyen206 commented 6 months ago

After following the instruction, I can access the web in localhost but I can't see the source code in the host machine. I can only access it inside the PHP docker container.

So how to expose the source code inside the docker container to the host? So I can edit it in development env? image

Usually, I use the volume like this in PHP container - .:/opt/drupal, but it doesn't work in this case

Renrhaf commented 6 months ago

Hi @HuyNguyen206, in the docker image the work directory is /app, maybe it would work if you switch to a volume like :

    volumes:
      - .:/app:cached

EDIT: Oh sorry you're right, I am using the base dunglas/frankenphp:1-php8.3 as upstream.

HuyNguyen206 commented 6 months ago

@Renrhaf As I checked in dockerfile, the WORKDIR is /opt/drupal, not /app. Even though, it doesn't work

volumes:
      - .:/opt/drupal:cached
HuyNguyen206 commented 6 months ago

hi @dunglas , could you help me to solve this issue? Maybe I am missing some configuration related to docker but I am not sure. Thank you in advanced.