shiyan / drupal-pantheon-lando-template
Simple composer project template for a Drupal 8 + Pantheon + Lando.
Installs: 10
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:project
Requires
- php: ^7.1
- composer/installers: ^1.2
- cweagans/composer-patches: ^1.6.5
- drupal-composer/drupal-scaffold: ^2.5
- drupal/console: ^1.0.2
- drupal/core: ^8.6.0
- drush/drush: ^9.5.0
- webflo/drupal-core-strict: ^8
Requires (Dev)
- drupal/coder: ^8.2.12
- overtrue/phplint: ^0.2.4
- phpunit/phpunit: ^4.8.35 || ^6.5
Conflicts
This package is auto-updated.
Last update: 2025-03-11 01:57:15 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:
- https://github.com/drupal-composer/drupal-project
- https://github.com/pantheon-systems/example-drops-8-composer
- https://github.com/lando/lando-pantheon-ci-workflow-example
Prerequisites
- Install Git
- Install Lando
- Install Composer
- Install Terminus
- Register at Pantheon, add your SSH public key, and create a machine token.
- Choose a machine-friendly site name. It should be all lower case with dashes instead of spaces.
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