Skip to main content

Run Drupal 9 with Composer + Docker-compose + Nginx + MariaDB + PHP8.1

Running Docker

Dangerous word... I'm assuming that Docker is installed.  Don't know how to check?  Using Terminal (I prefer iTerm2), run the following command

docker -D info

 

The set-up

Go to your project directory, and create a docker folder and a “docker-compose.yml” file:

Set-up Docker for Drupal

Is Docker installed?

Check if your installation is ok and spin up Docker as well:

docker -D info

 

Using Docker

Now it's time to download and install docker images. Using the official images of MariaDB and Drupal. If you don’t specify the absolute URL to the image it will be searched and downloaded from Docker Hub. Tag 'latest' will be used by default.

Docker - creating a container / image

Create and push to Docker Hub

Creating your own custom image... you need to have a Docker ID.  Not sure, well most likely you created it to download Docker Desktop.  If you don't have one, go to Docker and sign up.

In your  text editor create a file called Dockerfile in the same directory you want to have as your local site. No extension, just Dockerfile. Paste in this code and save the file:

Displaying a content type that has a paragraph within a paragraph in a twig file

I want to create a content type that has a paragraph.  Easy enough.

What happens when I want to extend this concept and have a paragraph within the first paragraph?  Importantly, then display the second paragraph in a twig file.

How to create a content type that holds a paragraph within a paragraph and make it display in twig files?

 

jquery-ui-slider-pips not loading, time to move to Svelte

Have you tried to run a composer update script that has bower-asset/jquery-ui-slider-pips set?  I have and realised that jquery-ui-slider-pips package had been removed.  So I added it back, and ran the command composer update.

blocking taxonomy terms from being indexed

Have you noticed through your Google account that there are items being indexed that shouldn't have been?   One for me was taxonomy terms.  Not important to be followed.

  1. Being indexed on my sitemap (do I just erase those entries on the XML file?)
  2. Being crawled (I am guessing this is with a robots.txt file though I have never created one before)
  3. Being viewed (stumbled upon) -> if this even possible to block?

 

Install / uninstall modules and themes using composer


Using Composer to Manage Projects and if required their dependencies

In this section, we're going to dive into how to use Composer to manage project dependencies. Specifically, we'll cover the following:

Subscribe to Drupal