-
make up
(default) - Build and run docker containers -
make stop
(st) - Stop docker containers -
make restart
(rs) - Restart docker containers -
make down
(dn) - Stop and Remove docker containers -
make shell
(sh) - Log in into php container -
make shell:node
(shn) - Log in into node container -
make cr
- Rebuild Drupal cache -
make cex
- Exports config -
make en [module_name]
- Download module by composer and enable it. -
make reinstall
(ri) - Reimport database from stage environment and run updates -
make db:dump
(dbd) - Create a dump from stage env and place it in /drupal/backup -
make db:dump:local
(dbdl) - Create a dump from current local env and place it in /drupal/backup -
make db:import
(dbi) - Import stored database from stage environment -
make db:import:local
(dbil) - Import stored database from local environment -
make update
(upd) - Run application updates (composer install, rebuild caches etc.) -
make tests [folder/testfile.php:testname]
- Run tests
Examples:
make tests
make tests frontend/DashboardCest.php:viewDashboard
-
make tests:debug
(td) - Run tests for tests within debug group -
make eslint
(el) - Run JS code analyzer for React app -
make cscheck [module_name]
- Run Coding standards analizer for Drupal app (check custom modules in /modules/anu folder)
Examples:
make cscheck
make cscheck anu_search
make csfix [module_name]
- Fix Coding standards issues for custom modules within /modules/anu folder
Examples:
make csfix
make csfix anu_search
Notes
- You should define
PLATFORM_PROJECT_ID
in.env
file to use backups from platform.sh. make
without arguments will run defaultup
rule.- You can also add
alias mk='make'
to ~/.bash_profile (MacOS) to use shortmk
indead ofmake
.
To access all npm
and yarn
commands you can simply run shell inside of node
Docker container:
docker-compose run node sh
Then use npm
or yarn
CLI as usual. For example, add a new package:
yarn add lodash
All you'll need to commit is the change to package.json
and package.json
files.
To access CLI to manage Drupal, run shell inside of php
Docker container:
docker-compose run php sh
Then run any command you need. It's possible to use composer
, drush
, drupal
.
If you want to run a single command inside of the container then you don't have to run shell first. Just do it this way:
docker-compose run php composer require drupal/devel:~1.0
After that commit resulting composer.json
and composer.lock
files.
Note that Drush and Drupal Console have to be invoked inside of web
folder, so you'll have to cd web
first.
Alternatively, you might use the following command to run drush
or drupal
CLI outside of Docker container:
docker-compose run php drush --root="./web/" <COMMAND>
If this command seems to be too long to type every time, consider adding it to the list of your bash aliases:
alias dockerdrush=docker-compose run php drush --root="./web/"
Then you'll be able to do something like this:
dockerdrush cr