- Public root in is
public
folder - Configuration is in
conf
folder - Custom modules are in
public/modules/custom
folder - Custom themes are in
public/themes/custom
folder
These recommended modules are included in the composer.json
, but you can remove them if not needed.
- Admin Toolbar - Improved Drupal Toolbar
- GDPR - GPDR checklist and data sanitizers
- Pathauto - Automated URL alias generating
- Swift Mailer - Advanced mailer
- System Status - Lumturio monitoring
By default we'll use Docker based environment.
- PHP and Composer
- Docker and Cachalot/Pygmy
Change the hostname in docker-compose.yml
file:
E.g. mysite.fi.docker.amazee.io
to yoursite.fi.docker.amazee.io
For the first time (new project member):
$ composer build-init
Then create and start the environment:
$ composer build-dev
This will log you inside the Drupal Docker container and in the public
folder:
$ docker-compose exec --user drupal drupal bash
Move to project root:
$ cd ..
This will download Drupal core, contrib modules and setup configuration. See Composer section below.
$ composer build-dev
Install the site using the standard profile:
$ bin/drush -r public si standard
Enable additional modules:
$ bin/drush -r public en admin_toolbar pathauto swiftmailer system_status -y
CHANGE ME! Replace this with sync instructions when you have environments where to sync from.
This template uses Composer to build the codebase.
Installations rely on composer.lock file. This can be updated by running composer build-dev
which will update the
lock file. Lock file us used by testing/staging/production builds and will not be updated then.
Build codebase with dev requirements and update composer.lock file:
$ composer build-dev
Build codebase without dev requirements using composer.lock file and optimized autoloader:
$ composer build-production|build-testing|build-staging
We use npm's shrinkwrap
command to lock the list of installed packages. This
ensures the exact same package versions being installed across different environments.
See package.json and npm-shrinkwrap.json.
Run all tests and checks
$ composer test
Run unit tests (PHPUnit)
$ composer test-unit
Run static PHP checks
$ composer test-static-php
Run static JS checks
$ composer test-static-js
Run behavioral tests (Behat)
$ composer test-behavioral
Drupal uses PHPUnit for unit, integration, and behavioral tests. See the documentation for more information about Drupal's usage of PHPUnit.
This template supports all PHPUnit-based tests, with the exception of functional-javascript
tests (built on
\Drupal\FunctionalJavascriptTests\JavaScriptTestBase
). Submodules are unsupported, because their tests cannot be
detected automatically.
Behat is used for behavioral testing. Its
configuration and the
features
to test are located in ./behat
.
Travis CI is used to run all automated analyses and tests for pull requests (PRs) and pushes.
Sensitive data MUST be encrypted. To instruct Travis CI to act on
changes to a particular repository, go to the Integration & services section of its settings page on Github, and
follow the instructions when adding Travis CI integration. Also update env.global
in ./.travis.yml
with
project-specific values.