$ composer create-project drupal-composer/drupal-project:8.x-dev $DRUPAL_DIR --stability dev --no-interaction
- /drush
- /scripts
- /vendor
- /web = Drupal Root
- composer.json
- composer.lock
- /deployment (chmod 700)
- /dumps (chmod 700)
- .git = Initialize your project git repository here
- .gitignore = rename the example.gitignore
- /config/sync (chmod 770)
$config_directories['sync'] = '../config/sync';
- use your projectname instead of mygroup
- Change the path-values 'uri' and 'root'
- Move the file to the location of your drush configuration
- for example /etc/drush
- composer.json
- comoposer.lock
- custom themes and modules
- vendor (Libraries)
- Drupal core
- Drupal contrib themes and modules
- @see example.gitignore
- We run composer update only on development,
-
- which updates all project according composer.json
- On production, we run only composer install
-
- which synronize all projects with composer.lock.
-
- That means the exact same version as tested on development.
-
- ! We run never composer update on production !
- Make development changes
- run $ drush config-export
- git add, commit and push
- $ composer require
- $ composer update
@see stage-rebuild.sh
$ sudo ./stage-rebuild.sh
- set maintance-mode TRUE
- Dump the stage database
- Remove stage database and import the fresh production database
- Remove the Drupal /files directory and replace it with the production one
- Pull the repository
- run $ composer install
- run $ drush updatedb
- run $ drush config-import to import the configuration changes
- run some security checks @see stage-rebuild.sh itself
- set maintance-mode FALSE
- Logfile is written to deployment/logs/*
- @see prod-rebuild.sh
$ sudo ./prod-rebuild.sh
- set maintance-mode TRUE
- Backup the web directory and the current composer.lock file
- Dump the producton database
- Pull the repository
- run $ composer install
- run $ drush updatedb
- run $ drush config-import to import the configuration changes
- run some security checks @see stage-rebuild.sh itself
- set maintance-mode FALSE