This method allows for a full composer workflow, and the ability to add continuos integration tools to your project workflow.
Details pulled from: https://pantheon.io/docs/guides/build-tools/
https://github.com/pantheon-systems/terminus-build-tools-plugin
Follow directions at pantheon's link above.
terminus build:project:create --team="Bluecadet" --org="bluecadet" --email="pinge@bluecadet.com" --admin-email="pinge@bluecadet.com" d8 philly-pwa
make sure to include team and org, otherwise projects will be saved to your personal accounts..htaccess
file at the root of the project. You will need to grab it from another repo OR from a clean download of Drupal from drupal.org.git clone git@github.com:bluecadet/mann-web.git [DIR]
obviously change out dir and path...composer install
terminus drush <site>.<env> -- ev 'return getenv("DRUPAL_HASH_SALT")'
/web/sites/example.settings.local.php
to /web/sites/default/settings.local.php
$databases['default']['default'] = array (
'database' => '[DB-name]',
'username' => '[DB-username]',
'password' => '[DB-userpassword]',
'prefix' => '',
'host' => 'localhost',
'port' => '3306',
'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
'driver' => 'mysql',
);
$settings['hash_salt'] = 'X/ZoCz4bINpIQq1xufoInrULRDtN0UABMUW7m09HcCY=';
$settings['trusted_host_patterns'][] = '^.+.localhost.com$';
$settings['trusted_host_patterns'][] = '^localhost.com$';
If you do not already have lando installed, visit https://docs.devwithlando.io/installation/installing.html
git clone git@github.com:bluecadet/[INSERT-REPO-NAME].git [DIR]
cd
into the project directory and run lando init
Pantheon
as the recipie, and select your Pantheon account. Select the site from the list.lando terminus auth:login --machine-token=[YOUR_MACHINE_TOKEN]
.
lando start
lando pull
.dev
enviornment to make sure you are up to date (or none).dev
dev
(or select none)Run lando info
. In the resulting json, your local urls can be found at:
{
...
"edge":
...
"urls":
"http://localhost:32801",
"http://yoursitename.lndo.site",
"https://yoursitename.lndo.site"
}
Visit one of these urls and make sure everything is working as expected.
When using Lando, all terminus
commands should be prepended with lando
, i.e:
lando terminus drush cim
Lando and Apache often compete for localhost port 80, so it might make sense to stop Apache before running Lando, i.e.:
sudo apachectl stop
git clone [repo]
composer install
lando init --recipe=pantheon
to bind to a Pantheon instancexdebug: true
web_docroot: true
php_version: 7.0
lando start
lando pull --code=none --database=dev --files=dev
lando composer require drupal/admin_toolbar drupal/config_devel drupal/config_split drupal/ctools drupal/devel drupal/diff drupal/focal_point drupal/hsts drupal/inline_entity_form drupal/new_relic_rpm drupal/pantheon_advanced_page_cache drupal/paragraphs drupal/redis
cd web
lando drush en admin_toolbar admin_toolbar_tools config_devel config_split ctools devel kint diff focal_point hsts inline_entity_form new_relic_rpm pantheon_advanced_page_cache paragraphs
NOTE: turn on Redis LATER!!
lando composer require drupal/metatag drupal/pathauto drupal/redirect drupal/token drupal/viewsreference
cd web
lando drush en metatag pathauto redirect token viewsreference
lando drush en block_content media
lando drush pmu big_pipe color comment help history quickedit rdf responsive_image tour
Note: delete comment field on Article before trying to run above command