Installation

Checkout codebase

The Rain packages are available for you to clone in a modified version of the recommended Drupal composer template.

The project is hosted on a public Bitbucket repo which can be cloned using the following command:

git clone git@bitbucket.org:mediacurrent/drupal-project.git shortcode_project

Change to the project folder and run the following command to initialize the codebase.

composer install
rm web/sites/default/.gitignore

This runs composer install. As this is the first time being run, it is a composer update and calculates all dependencies.

Spin-up your local environment

Any local development tool should work, at Mediacurrent we use DDEV. DDEV users can use the setup instructions below:

DDEV Configuration

Run DDEV’s configuration tool

You can pass in defaults (recommended options below), or you can run it without arguments for an interactive configuration tool.

# Option 1: Non-interactive configuration. Project names must be alphanumeric and/or hyphenated.
ddev config --docroot=web --project-name="project" --project-type=drupal9 --webserver-type="nginx-fpm" --create-docroot

# Option 2: Interactive configuration
ddev config
  • Project name ( as above this is typically the first part of the domain name.)

  • Docroot Location = web

  • Project Type = drupal9

Start DDEV

After configuration has been completed, start the ddev containers.

ddev start

(Optional) Setting Up NFS

Docker generally has poor performance on very large projects with many directories on MacOS and Windows hosts. Using NFS for volumes can lead to significant gains in performance and mitigate this issue. See the DDEV-Local official documentation page for more information on setup and configuration.

It's recommended to configure NFS globally during the during the initial ddev client setup.

Initialize Project

Run the following commands to initialize the project.

./scripts/hobson project:init project.ddev.site
  • This command ensures the config/config.yml is in place and has the domain set.

Restart environment

If DDEV is being used as the local environment, run the following command:

ddev restart

Advanced Configuration

For additional configuration options, see our Advanced configuration guide.

Install the Rain Demo (optional)

Congratulations, you have installed Rain CMS!

Last updated