xenomedia / hebe-lite
Install drops-8 with Composer on Pantheon.
Installs: 44
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 124
Open Issues: 2
Type:project
Requires
- php: >=7.3
- composer/installers: ^1.9
- cweagans/composer-patches: ^1.7
- drupal/core-composer-scaffold: ^9.1
- drupal/core-recommended: ^9.1
- drush/drush: ^10.3
- vlucas/phpdotenv: ^5.1
- webflo/drupal-finder: ^1.2
Requires (Dev)
Conflicts
README
This repository is a fork of example-drops-8-composer.
This repository is a start state for a Composer-based Drupal workflow with Pantheon at Xenod Media.
Installation
Start off by creating a new Drupal 8 site; then, before installing Drupal, set your site to git mode and do the following from your local machine:
$ composer create-project xenomedia/hebe-lite my-site
$ cd my-site
$ composer prepare-for-pantheon
$ git init
$ git add -A .
$ git commit -m "web and vendor directory from composer install"
$ git remote add origin ssh://ID@ID.drush.in:2222/~/repository.git
$ git push --force origin master
- The
--team
flag is optional and refers to a Pantheon organization. Pantheon organizations are often web development agencies or Universities. Setting this parameter causes the newly created site to go within the given organization. Run the Terminus commandterminus org:list
to see the organizations you are a member of. There might not be any.
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/
.