An all inclusive solution for Drupal development on windows.
Technologies
This project was orginally created to establish a standared way of building drupal environments on Windows using Docker. However I have discoved a technology Lando to be a more compelete project that I have used both professionally and personally. Lando provides many features that I would nevery have time to implement.
Getting Drupal set up on windows can be a daunting and a barrier to learning Drupal. WDD aims to simplify the process to get developers up and running quickly.
Follow the installation instruction to setup and install Docker Desktop.
Docker - Install Docker Desktop on Windows
Follow the installation instruction to setup and install WLS.
Windows Subsystem Linux (WSL2) - Install Linux on Window with WSL
Follow the installation instruction to setup and install Visual Studio code
*NOTE: Install VS Code on the windows side, ensuring you click Add to PATH
.*
Visual Studio Code - Download for Windows
Visual Studio Code - Developing in WSL
You can download Windows Terminal through the Microsoft Store.
Microsoft Store - Windows Terminal
1) Open a terminal and start WSL
You should be opened up in your user home directory.
/home/{user_name}
2) Clone the repository
3) Check out the branch of the corresponding Drupal stack.
Drupal Version | Branch | Checkout command |
---|---|---|
v10 | drupal-v10 | $ git checkout drupal-v10 |
v9 | drupal-v9 | $ git checkout drupal-v9 |
v8 | drupal-v8 | $ git checkout drupal-v8 |
4) Update .env
file
Before being up your Drupal Docker stack.
- Copy the
default.env
to.env
- Fill out the each configurations.
*see environment variables for addition details.
5) Bring up Docker Stack
Run the following command to bring up your docker stack
$ docker compose up -d
6) Copy the default.settings.php
to default.settings.php
$ sudo cp drupal/web/sites/default/default.settings.php drupal/web/sites/default/settings.php
7) Change Drupal Directory Permissions
$ sudo chmod -R 777 drupal
* should only be used for development environment to prevent issues with permissions.
8) Access Applications
- Drupal - http://localhost:8080/
- PHP MyAdmin - http://localhost:8090/
- MySQL - Accessible via localhost:3306
In step 4 Set up database of the Drupal site configuration, you will need to change the host of the database from localhost to mysql
Once the Drupal Docker stack is running you will have the following ending directory.
.
├── drupal # Drupal mounted volume directory containing Drupal core.
├── mysql # MySQL mounted volume directory containing MySQL database.
[TBD]
├── main # Minimal project files that can be applied to each drupal stack - not development ready
│ ├── v10 (drupal-v10) # Drupal 10 development stack - ready for development
│ │ ├── dev (drupal-v10-dev) # Drupal 10 stack development
│
│ ├── v9 (drupal-v9) # Drupal 9 development stack files - ready for development
│
│ ├── v8 (drupal-v8) # Drupal 8 development stack files - ready for development