Skip to content

Instantly share code, notes, and snippets.

@jmolivas
Last active February 2, 2016 16:17
Show Gist options
  • Save jmolivas/00eb21cd948a5222f686 to your computer and use it in GitHub Desktop.
Save jmolivas/00eb21cd948a5222f686 to your computer and use it in GitHub Desktop.
Drupal Composer + post-install.yml and post-update.yml examples
commands:
# Install Drupal
- command: site:install
options:
langcode: en
db-type: mysql
db-host: 127.0.0.1
db-name: drupal_composer
db-user: root
db-pass: root # local config
db-port: 3306
site-name: 'Drupal 8 site'
site-mail: admin@example.org # default email
account-name: admin # default account
account-mail: admin@example.org # default email
account-pass: admin # default pass
arguments:
profile: standard
- command: cache:rebuild
arguments:
cache: all
# Install modules
- command: module:install
arguments:
module:
- admin_toolbar
- admin_toolbar_tools
- disqus
- big_pipe
- token
- ctools
- pathauto
- gist_embed
# Restore Database
# - command: database:restore
# options:
# file: ../drupal_composer.sql
# Import configuration
# - command: config:import
# Create dummy data
# - command: create:users
# - command: create:vocabularies
# - command: create:terms
# - command: create:nodes
# Rebuild cahes
# - command: cache:rebuild
# arguments:
# cache: all
commands:
# Drop database
- command: database:table:drop
arguments:
database: default
# Restore Database
- command: database:restore
options:
file: ../drupal_composer.sql
# Import configuration
# - command: config:import
# Create dummy data
# - command: create:users
# - command: create:vocabularies
# - command: create:terms
# - command: create:nodes
# Rebuild cahes
- command: cache:rebuild
arguments:
cache: all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment