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 Xeno Media.
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/xeno-base 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://[email protected]:2222/~/repository.git
$ git push --force origin master
update robo.yml.dist and the env file with your new environment’s name.
Run robo setup
Run the Drupal site setup
Run drush config-get "system.site" uuid
Update config/system.site.yml with your website’s uuid, sitename and email address.
Run drush cim-y
Export your database from adminer.xeno-base.test
Upload your database to the livedb folder on xenostaging.
Update the jenkins file with your website information. Search for SITENAME and replace with the correct site name.
If you make any changes, run drush cex-y
- 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.
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.
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.
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
.
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/
.