pantheon-systems/example-drops-8-composer

Name: example-drops-8-composer

Owner: Pantheon

Description: Install drops-8 with Composer on Pantheon.

Created: 2016-10-17 18:48:53.0

Updated: 2018-05-22 09:26:45.0

Pushed: 2018-04-25 17:05:36.0

Homepage: null

Size: 763

Language: PHP

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Example Drops 8 Composer

CircleCI Pantheon example-drops-8-composer Dev Site example-drops-8-composer

This repository is a start state for a Composer-based Drupal workflow with Pantheon. It is meant to be copied by the the Terminus Build Tools Plugin which will set up for you a brand new

For more background information on this style of workflow, see the Pantheon documentation.

Installation
Prerequisites

Before running the terminus build:project:create command, make sure you have all of the prerequisites:

You may find it easier to export the GitHub and CircleCI tokens as variables on your command line where the Build Tools Plugin can detect them automatically:

rt GITHUB_TOKEN=[REDACTED]
rt CIRCLE_TOKEN=[REDACTED]
One command setup:

Once you have all of the prerequisites in place, you can create your copy of this repo with one command:

inus build:project:create pantheon-systems/example-drops-8-composer my-new-site --team="Agency Org Name"

The parameters shown here are:

Important files and directories
/web

Pantheon will serve the site from the /web subdirectory due to the configuration in pantheon.yml, facilitating a Composer based workflow. Having your website in this subdirectory also allows for tests, scripts, and other files related to your project to be stored in your repo without polluting your web document root.

/config

One of the directories moved to the git root is /config. This directory holds Drupal's .yml configuration files. In more traditional repo structure these files would live at /sites/default/config/. Thanks to this line in settings.php, the config is moved entirely outside of the web root.

composer.json

If you are just browsing this repository on GitHub, you may notice that the files of Drupal core itself are not included in this repo. That is because Drupal core and contrib modules are installed via Composer and ignored in the .gitignore file. Specific contrib modules are added to the project via composer.json and composer.lock keeps track of the exact version of each modules (or other dependency). Modules, and themes are placed in the correct directories thanks to the "installer-paths" section of composer.json. composer.json also includes instructions for drupal-scaffold which takes care of placing some individual files in the correct places like settings.pantheon.php.

Behat tests

So that CircleCI will have some test to run, this repository includes a configuration of Behat tests. You can add your own .feature files within /tests/features/.

Updating your site

When using this repository to manage your Drupal site, you will no longer use the Pantheon dashboard to update your Drupal version. Instead, you will manage your updates using Composer. Ensure your site is in Git mode, clone it locally, and then run composer commands from there. Commit and push your files back up to Pantheon as usual.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.