![]() ![]() Once setup, in your terminal (inside your code directory root) run the command: If you are not wanting to run automated tests, then you do not need to include chrome, selenium (potentially MariaDB) in this file. That’s what ‘d-sync’ refers to in the above config. As I’m using Mac, I also had to setup Docker-sync to improve file synchronization and utilization. Important note: one of the drawbacks of Docker is that sharing file systems can be problematic with performance hits to be expected, especially if your host is Mac or Windows. For my purposes, this is only used for testing If you want to use it instead of a DB on your host machine then make sure to add a persistent volume so that your DB isn’t lost when the container is shut down. MariaDB - This can be either used to host your Drupal database, or for testing only.Selenium - This is only needed for automated browser-based tests.Chrome - This is only needed for automated browser-based tests.Nginx - This container comes with the latest nginx and PHP 7.4 (with xdebug enabled).This configuration file contains the description and configuration for 4 different Docker containers: PHP_DISMOD=ioncube,redis,memcached,apcu,bcmath,bz2,calendar,dom,exif,ftp,imagick,ldap,mongodb,mysqli,mysqlnd,pcre,pdo_pgsql,pgsql,posix,readline,Reflection,shmop,sockets,sodium,vips In this document, insert the following: version: "3" services:Ĭontainer_name: "nginx" hostname: nginx.local This will be used to spin up & down the containers that we need to serve the application locally (the setup differs slightly for test/production deployments). In your new code directory, add a new file docker-compose.yml. In addition to core Docker, we also want to install Docker-compose: I’m a bit of a convert these days, it can be pretty cool… when it works. I was quite late to party as far as Docker/containerisation is concerned, I always felt it created more problems than it solved. Where my_site_name_dir you should change to your desired project name.Īt this point we have the codebase, but we can’t yet run it as we haven’t configured our local hosting environment. *PHP and Composer are required for this step.Ĭomposer create-project drupal/recommended-project my_site_name_dir In your empty git directory, run the following command to install the Drupal codebase and any composer dependencies. The app we’re building is of course drupal 9. BitBucket Pipelines are crucial to this tutorial.įollow this link to find out how to create a BitBucket account and create a new repository. ![]() In the years since they have massively added to their ecosystem with pipelines, Jira, Confluence, Trello and such and now I just think they are the better provider as a result. There are alternatives such as GitHub, GitLab etc, but in the early days I picked BitBucket because you get free private repositories. In this section we will cover the steps needed to get a Drupal 9 site installed and running locally using docker and the code being hosted in BitBucket.Ī standard procedure at the beginning of any new project for us is to create a private BitBucket repository. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |