Drupal 8 deploy commands

This page will help you to know what to kind of commands that you can put in the list of your deploy commands:

// Install composer required libraries.
composer install
// Import configurations using (sync) or (production) configurations.
// (You have to define these types in $config_directories settings.php).
// drush config-import production
drush config-import sync
// Update locale files.
drush locale-check && drush locale-update && drush cr


These commands below should not be in the deploy commands but you may want to execute them once.
// Sometime you may want to set the site ID using this command so we can import config:
drush cset system.site uuid SITE_UUID_HERE
// In order to make sure to set some of the variables you may want to set some variables
// per environment.
drupal state:override SOME_VARIABLE_NAME
// And the value of this variable will be specifically for a specific environment.
// Deploy
echo "██████ DEPLOY"
cd /var/www/html
// #git checkout composer.json
echo "Pulling changes from git repo .."
git pull
echo "Installing composer .."
composer install --no-interaction
./vendor/bin/drush cim -y
./vendor/bin/drush cim -y
./vendor/bin/drush locale-check
./vendor/bin/drush locale-update
./vendor/bin/drush cr
chown www-data:www-data -R /var/www/html


// Multiple hosts deploy command // #/bin/sh echo "██████ DEPLOY" cd /var/www/html/$1 git checkout composer.json echo "Pulling changes from git repo .." git pull echo "Installing composer .." composer install ./vendor/bin/drush cim -y ./vendor/bin/drush cim -y ./vendor/bin/drush locale-check ./vendor/bin/drush locale-update ./vendor/bin/drush cr chown www-data:www-data -R /var/www/html/$1

Bluetooth issue:

sudo sed -i 's/#IdleTimeout=30/IdleTimeout=0/g' /etc/bluetooth/input.conf

Share this post