Skip to content

previousnext/drupal-project

Repository files navigation

Drupal Project

Use this project as a template for working on Drupal core and contrib modules.

Requirements

Most of the dev tools are in the php Docker container, but you will need one or two out side of that.

This includes:

If you don't have these installed, then follow the instructions for your specific platform.

MacOS

Download and install Homebrew follow the online instructions.

Add the php tap:

brew tap homebrew/homebrew-php
brew install git composer php71 php71-mcrypt php71-xdebug

Windows

TBC

Installing

To create a new project in a directory called `myproject' run the following command.

composer create-project --no-install -s dev previousnext/drupal-project myproject

Docker

You will need to install Docker and related tools.

OS-specific Installation

MacOS

Download and install Docker for Mac

Windows

Download and install Docker for Windows

Download and install Make for Windows

Linux

You know what you're doing, right?

Docker Compose

Due to networking, and file system performance issues in Docker for Mac, you need a slightly different docker-compose.yml file for MacOS. To simplify your commands, we recommend creating an alias in ~/.bashrc such as:

alias dc='docker-compose -f docker-compose.osx.yml'

To start the container, run:

dc up -d

Setup and Install Drupal

For simplicity, run all commands from within the php container. You can get shell access via:

dc exec app bash

To initialise your local dev environment run the following:

make install

Developer Options

To set up common developer options, run:

make devify

Install a contrib module

The easiest way to install a contrib module to work on is via composer.

For example, to work on pathauto, type the following:

composer require drupal/pathauto --prefer-source

Testing

To run tests, run:

make test

About

A template for Drupal 8 projects.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published