Skip to content
Snippets Groups Projects
Commit aece0655 authored by Dimitra Chatzichrysou's avatar Dimitra Chatzichrysou
Browse files

Merge branch 'move-scripts' into 'master'

Move scripts to drupal-runtime

See merge request !9
parents 3a42005f bb17a711
No related branches found
No related tags found
1 merge request!9Move scripts to drupal-runtime
Pipeline #2542363 passed
#!/bin/sh
set -exu
# Change working directory to the drupal code
cd /app
# Check if Drupal site is installed
echo "Checking if Drupal site is installed"
drush status bootstrap | grep -q Successful
# Make sure we get a successful response
if [$? -ne 0]; then
echo "Drupal is not installed" >&2
exit 1
fi
exit 0
#!/bin/sh
set -exu
# Change working directory to the drupal code
cd /app
# Clean cache
echo "Cleaning cache"
drush cr
#!/bin/sh
set -exu
# Change working directory to the drupal code
cd /app
# Clone data from source to destination
rsync -av /drupal-data-source/ /drupal-data
/scripts/database-restore.sh
/scripts/clear-cache.sh
#!/bin/sh
set -exu
# Change working directory to the drupal code
cd /app
# Database backup
echo "Database backup"
drush sql-dump > /drupal-data/dbdump.sql
#!/bin/sh
set -exu
# Change working directory to the drupal code
cd /app
# Database drop
echo "Database drop"
drush sql-drop -y
# Database restore
echo "Database restore"
`drush sql-connect` < /drupal-data/dbdump.sql
#!/bin/sh
set -exu
# Change working directory to the drupal code
cd /app
# Disable maintenance mode
echo "Disabling maintenance mode"
drush state:set system.maintenance_mode 0 --input-format=integer
drush cache:rebuild
#!/bin/sh
set -exu
# Change working directory to the drupal code
cd /app
# Enable maintenance mode
echo "Enabling maintenance mode"
drush state:set system.maintenance_mode 1 --input-format=integer
drush cache:rebuild
#!/bin/sh
set -exu
# Change working directory to the drupal code
cd /app
# Install Drupal site
echo "Installing Drupal site"
drush site-install -y --config-dir=../config/sync --account-name=admin --account-pass=pass --account-mail=admin@example.com
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment