syp / drupal-project
Drupal 11 project template with Drush and the syp/drun task runner.
Requires
- composer/installers: ^2.3
- drupal/core-composer-scaffold: ^11.4
- drupal/core-project-message: ^11.4
- drupal/core-recipe-unpack: ^11.4
- drupal/core-recommended: ^11.4
- drush/drush: ^13.6
Requires (Dev)
- syp/drun: ^2.0
Suggests
None
Provides
None
Conflicts
Replaces
None
This package is auto-updated.
Last update: 2026-10-25 12:23:01 UTC
README
A Drupal 11 project template. It is based on drupal/recommended-project,
with the web root in web/, and adds Drush and the
syp/drun task runner.
Create a project
Composer runs in the platform's dev image, so the host needs Docker, not PHP:
docker run --rm -v "$PWD":/app -w /app registry.gitlab.com/pristan-platform/runtimes/drupal:8.3-dev \
composer create-project syp/drupal-project mysite
cd mysite
docker compose up -d
git init
docker compose exec web vendor/bin/run git:hooks-install
With PHP and Composer on the host, composer create-project syp/drupal-project mysite
and vendor/bin/run git:hooks-install do the same.
create-project runs vendor/bin/run drun:init, which writes these files
to the project root:
runner.ymlphpcs.xml.distphpstan.neon.distweb/sites/default/settings.php: Pristan's, readingDB_*andDRUPAL_HASH_SALTfrom the environment. Commit it.
The template also ships settings.site.php (the site's own settings, loaded by Pristan
too).
Review runner.yml and commit it. Put machine-specific overrides, such as
drun.exec.prefix, in runner.local.yml; git ignores that file.
Everyday commands
The runner and Drush run inside the web container: prefix each with
docker compose exec web, as below.
docker compose exec web vendor/bin/run site:install-clean # install from config/sync, then deploy steps
docker compose exec web vendor/bin/run site:install-dump # import drun.dump.path, then deploy steps
docker compose exec web vendor/bin/run site:update # deploy.site.sh, else drush deploy
docker compose exec web vendor/bin/run qa:all # lint, phpcs, phpstan, composer audit
docker compose exec web vendor/bin/run list # everything else
See the syp/drun README for configuration.
Notes
- The pre-commit hook runs
qa:lintandqa:phpcswith the host's PHP when there is one, else in the runningwebcontainer. Without either it fails:docker compose up -d, then commit again. - The first install has no
config/sync: rundocker compose exec web vendor/bin/drush site:install minimal -y, thendocker compose exec web vendor/bin/drush config:export -y, and commit the result.site:install-cleanandsite:updateneed it. site:install-dumpdownloads the sanitised dump withGITLAB_USERandGITLAB_TOKEN(a token withread_api) from the environment; setdrun.dumpinrunner.yml. Pass them into the container withdocker compose exec -e GITLAB_USER -e GITLAB_TOKEN web ….- in
compose.ymlpublishe the site on127.0.0.1:8080only. To reach it from another machine, change the binding to8080:8080. - Drush is a production dependency because deployments need it. syp/drun is a dev dependency, used only locally and in CI.