![]() If you want to compare something - feel free to check the code from the example on our GitHub page and also you may see the whole process in the video below. As we merged the two projects - it is there and you are able to access it directly under Īnd the last important bit that you have to know when installing is that when you are on the screen where you input the database cridentials - you would have to use the ones specified in the docker_compose.yml : DB_HOST: mariadbĪs for inputting the host - you would have to click on advanced when you are on the screen with the database credentials. Well, the drupal composer project is creating a folder structure where there is a web folder, containing the whole Drupal codebase and the PHP and Nginx containers are expecting the web folder in the root folder too. In the terminal, we would have to make sure we are in the drupal_dandy folder and we could build all the containers like this: docker-compose up -dĪfter it is ready we could check which containers are built with docker psĪfterwards, we could access our Drupal install screen by going to We would start Docker and then open the terminal. var/run/docker.sock:/var/run/docker.sockĪaand we are ready to build. # PHP_XDEBUG_TRACE_OUTPUT_DIR: /mnt/files/xdebug/tracesĪlso for the nginx volumes, we could change the volumes as well: volumes:Īnd for accessing the built containers I like to change the ports to 8888 like this: traefik:Ĭommand: -c /dev/null -web -docker -logLevel=INFO # PHP_XDEBUG_PROFILER_OUTPUT_DIR: /mnt/files/xdebug/profiler PHP_SENDMAIL_PATH: /usr/sbin/sendmail -t -i -S mailhog:1025 Images without Drupal – wodby/drupal-php:. Images with vanilla Drupal – wodby/drupal:. Also, we will change the volumes path so that it starts from the current folder. So in the lines of the PHP container - we would comment out the image with the Drupal and we will uncomment a PHP image. If we start with the PHP container - there is a possibility to have directly Drupal installed but I like more the idea of having a PHP, let's say 7.x there and that we have our Drupal codebase handled by our neat drupal composer project setup. Basically, we have declared all the containers that we will create and they will be connected internally and will be part of an environment on which we will run our Drupal 8 projects. It is time to change a bit the docker_compose.yml file in order to have it ready for our project structure. Then we could just remove the .git file and then copy the content of the drupal_docker_server into the drupal_dandy folder like this: rm -R drupal_docker_server/.git If we go to the GitHub page of the project and get the GitHub link to it we can just clone it in another folder like this: git clone drupal_docker_server As we said we will use the docker4drupal. Let's now go ahead and take care of building a server where we could install, test and further develop our Drupal 8 project. This means we have our Drupal codebase prepared and built. As a folder structure it should look something like this: This will create a folder, called drupal_dandy with the content of the drupal-composer boilerplate. In order to do that you may just change from the terminal to the folder where you have your Drupal projects and execute the following: composer create-project drupal-composer/drupal-project:8.x-dev drupal_dandy -stability dev -no-interaction Let's start with creating our drupal-composer setup. Regarding the docker4drupal project - it is a docker compose oriented setup that presets definitions of several Docker containers that are needed in order to build and have a functional development environment literally in minutes. We will not get into too many details about it, as the project Github page covers it pretty well. So let's start with some words about the two projects - first drupal-composer is a perfect kickstart that will help you to easily maintain your module dependencies in Drupal 8 with the help of composer. ![]() ![]() Also, you would have to have git installed. How to install composer and docker you may find here and here. My personal structure is slightly improved but is also inspired by the drupal-composer project ( I will present that in a different article ). As you know from the 8th version of Drupal it is highly recommended to use composer for your setup and the drupal-composer project is the recommended structure. ![]() In this tutorial, we are going to check how to install Drupal 8 with the help of drupal-composer and docker4drupal projects. ![]()
0 Comments
Leave a Reply. |