shiyan/drupal-pantheon-lando-template

Simple composer project template for a Drupal 8 + Pantheon + Lando.

dev-master 2019-01-10 00:03 UTC

This package is auto-updated.

Last update: 2022-06-10 20:02:11 UTC


README

Provides a starter kit for:

  • Managing your site dependencies with Composer
  • Hosting your site on Pantheon
  • Developing locally with Lando
  • Running tests locally.

This template is based on 3 others:

Prerequisites

Usage

Run the following commands one at a time.

Set variables for re-use in terminal session. Replace values with yours.

export SITE_NAME="my-project"
export SITE_LABEL="My New Shiny Project"
export MACHINE_TOKEN="my_pantheon_machine_token"

terminus auth:login --machine-token=$MACHINE_TOKEN
terminus site:create $SITE_NAME "$SITE_LABEL" empty

The last command may complain that the site name is taken. In that case, try it with another name instead of the $SITE_NAME, and then on success re-export the SITE_NAME var with a new value.

composer create-project --remove-vcs shiyan/drupal-pantheon-lando-template:dev-master $SITE_NAME
cd $SITE_NAME

lando init --recipe=pantheon --pantheon-auth=$MACHINE_TOKEN --pantheon-site=$SITE_NAME

git init
git add --all
git commit --message="Started project."

Start the project locally.

lando start
lando terminus auth:login --machine-token=$MACHINE_TOKEN
lando drush site:install --yes

Then deploy it to Pantheon.

lando deploy-code
lando push --code=none --database=dev --files=dev
terminus drush $SITE_NAME.dev -- cache:rebuild