manaticr/pantheon-drupal-template

Project template for Drupal 9 projects with a relocated document

2.0.1 2021-08-04 13:54 UTC

This package is auto-updated.

Last update: 2024-11-04 21:41:36 UTC


README

Template based on drupal/recomended-project to create drupal projects to be deployed in Pantheon, also includes:

Dependencies

Getting Started

How to use

Use this template along the composer create-project command, to do that follow this instructions:

  • Create a new folder to store your new project code base, example: mkdir my-project
  • Create your project using this template composer create-project manaticr/pantheon-drupal-template my-project

Prepare for local development

This template uses chirripo as local environment.

Generate local settings files (run this command at root of the project):

./scripts/dev/local-settings.sh

Install the requiered dependencies:

composer install --ignore-platform-reqs
npm install

Run the local environemnt (Chirripo Launcher should be installed in order to execute chirripo command globally):

chirripo start

Install the local site (run this command at root of the project):

./scripts/dev/site-install.sh

Enable and configure the Chirripo Proxy.

Start the proxy:

chirripo proxy-up

Import the existing site

Download database in the root of the project, then change the name of the file by db_site.sql.gz

Import the databese:

./scripts/dev/install-from-db.sh

Add the site URL in the settings/settings.local.php file:

$config['stage_file_proxy.settings']['origin'] = 'SITE_URL';

Installed Stuff

You can change any variable defined in the .env file to make adjustments to the provided setup. You can edit the file named docker-compose.override.yml in the root of the project to make more advanced customizations.

Solr

Core is created as collection1.

Solr address is solr.

Path is /.

Testing

This project uses npm to run gulp tasks.

To run drupalcs, phplint and eslint tasks:

npm run test

To compile/transpile Javascript es6:

npm run build:js

To run lighthouse test in front page:

npm run lighthouse

To run lighthouse in a custom url:

node_modules/.bin/lhci autorun --collect.url=CUSTOM_URL