docker4drupal icon indicating copy to clipboard operation
docker4drupal copied to clipboard

Developing for Drupal9 on windows

Open javaskater opened this issue 2 years ago • 1 comments

  • I try do develop modules in Drupal9 using VSCode on Windows and Drupal 9 in a Docker Container (For that pupose, I am using the Docker for Drupal project)
  • on the Window side I get in my VSCode workspace the following structure:
PS C:\Users\jeanp\CONSULTANT\docker4drupal> dir


    Répertoire : C:\Users\jeanp\CONSULTANT\docker4drupal


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----        30/07/2021     11:12                .github
d-----        31/07/2021     14:12                .vscode
d-----        30/07/2021     11:12                mutagen
d-----        30/07/2021     11:12                tests
d-----        22/07/2021     04:17                vendor
d-----        22/07/2021     04:17                web
-a----        30/07/2021     11:12              6 .dockerignore
-a----        30/07/2021     11:12           2300 .env
-a----        30/07/2021     11:12             26 .gitignore
-a----        30/07/2021     11:12            390 docker-compose.override.ym 
                                                  l
-a----        31/07/2021     14:25           9789 docker-compose.yml
-a----        30/07/2021     11:12           3016 docker.mk
-a----        30/07/2021     11:12           1083 LICENSE.md
-a----        30/07/2021     11:12            137 Makefile
-a----        30/07/2021     11:12           9142 README.md
-a----        30/07/2021     11:12            423 traefik.yml

the web and vendor directories are copied from the php container!

  • On the windows side (Host) when I create a Hello World empty module under web/modules/custom/helo_world/hello_world.info.yml this one does not appear under http://drupal.docker.localhost:8000/admin/modules
    • and this although there is a volume definition in the php container and the nginx container (see the docker-compose file).
volumes:
    - ./:/var/www/html:cached

javaskater avatar Aug 03 '21 09:08 javaskater

docker-compose.override.yml file overrides php image to vanilla, if you have your own codebase you should just delete, it's all described in the docs

csandanov avatar Aug 12 '21 06:08 csandanov