The file default_vars.py
contains the default configuration.
Caution
|
You should not edit this file directly. |
Instead, copy the file in a file named local_vars.py
.
$ cp default_vars.py local_vars.py
The configuration specified in this new file will be loaded by Drupalizer and will override the default configuration.
The configuration parameters are grouped in section, to ease maintenance and readability. All those variables are loaded as Fabric environment variables.
Those are global project parameters mandatory to Drupalizer.
Parameters | Description |
---|---|
project_name |
Machine-name of the project. |
workspace |
Project root directory. |
always_use_pty |
This env var is defined by Fabric itself, and it’s defaut value is True. |
You can easily pass it to False, addinf --no-pty to your fab command line. Useful in Jenkins jobs. |
locale |
Parameters | Description |
---|---|
site_root |
Drupal root. Usually src/drupal. |
site_name |
Drupal site name. Set during installation. |
site_environment |
Default: local. |
site_profile |
The installation profile, if any. |
site_profile_repo |
The installation profile git repository, if applicable. |
site_profile_makefile |
The Drush Makefile to run to build the platform. |
site_db_user |
The database user name. Default: dev. |
site_db_pass |
The database password. Default: dev. |
site_db_host |
The database hostname. Default: localhost |
site_db_name |
The database name |
site_hostname |
The site hostname (Optional). |
site_admin_user |
The Drupal administrator user name. Default: admin. |
site_admin_pass |
The Drupal administrator password. Default: admin. |
site_subdir |
The Drupal site directory (only for multisite). Default: default. |
site_languages |
Translation files you need to download when building new Drupal installation (separate with comma). Default: fr. |
Parameters | Description |
---|---|
docker_workspace |
The Docker workspace. Default: /opt/sfl |
docker_site_root |
Drupal root in the Docker container. Default: /opt/sfl/src/drupal. |
bind_port |
The Docker port. Default: 8001. |
apache_user |
The user running Apache in the Docker container. Default: www-data. |
container_ip |
Docker auto-added container IP. Do not edit. |
Drupalizer is a Fabric script on top of Docker and tightly integrated with Drush and Drupal that provides the developer high-level tasks to manage the local development environment.
Tip
|
Drupalizer should be configured as a git submodule for every project that needs to use it. |
For a complete overview of all available commands, run:
$ fab --list
To get a more nested or tree-like view, pass the following option:
$ fab --list-format=nested --list
The top-levels tasks are larger tasks that include others. They are the most commonly called tasks.
-
Setup the Docker container, and run a full Drupal installation:
$ fab init
-
Run the Drupal installation
$ fab install
Caution
|
This command will wipe all the modifications made in the working directories. |
-
Update the Drupal installation
$ fab update
Caution
|
This command may wipe the modifications made in the working directories. |
-
Configure and run the Behat tests:
$ fab test
Tip
|
The formatters used are pretty and junit. |
-
Deploy the Drupal installation to a Web Server
$ fab deploy:dev
Tip
|
'dev' is the environment to deploy the Drupal installation, see the default_vars.py file. |
-
Deploy the Drupal installation to Aegir
$ fab --set=build_number=1,migrate=true,remove_platform=true deploy:dev
Tip
|
'migrate' and 'remove_platform' are optionals parameters but 'build_number' is not, you should pass it always with a different value. |
Some more atomic tasks supported by Drupalizer would be:
-
Start/stop the Docker container:
$ fab docker.container_start $ fab docker.container_stop
-
Bash into the Docker container:
$ fab docker.connect
-
Run the Behat tests (without configure):
$ fab behat.run
-
Update the full codebase by running the top-level Makefile:
$ fab drush.make
Caution
|
This command will wipe all the modifications made in the working directories. |
-
Archive the full codebase and the database using drush archive_dump:
$ fab drush.archive_dump
-
Generate the guide style:
$ fab patternlab.build