Skip to content

Instantly share code, notes, and snippets.

@kyleskrinak
Last active August 23, 2016 16:36
Show Gist options
  • Save kyleskrinak/f91f99a7c3419dfd1813 to your computer and use it in GitHub Desktop.
Save kyleskrinak/f91f99a7c3419dfd1813 to your computer and use it in GitHub Desktop.
Creating a new Drude project directory
(( TODO: add php.ini file instructions ))
create directory off ~/Projects
dsh install drude
gsed -i -e "s/hello-world/<sitename>/g" docker-compose.yml # edit docker-compose.yml VIRTUAL_HOST to point to directory
# echo "192.168.10.10 $(basename $(pwd))" | sudo tee -a /etc/hosts # update /etc/hosts for new host --append on linux, -a on OSX. No longer needed
svn export https://github.com/blinkreaction/drude/trunk/examples/.drude #grabs the config files for php, mysql from drude project
drush dl drupal-7 --drupal-project-rename="docroot"
drush dl drupal-8 --drupal-project-rename="docroot"
dsh up
dsh bash cli and update composer inside shell session
sudo composer self-update
composer global update
# The following is for TTS/D7 site builds
cd docroot/sites
rm -rf all/
git clone -b staging git@gitlab.oit.duke.edu:tts-drupal-sites/tts_sites_all.git all
git clone -b staging git@gitlab.oit.duke.edu:tts-drupal-themes/tts-base-responsive.git all/themes/tts
mv sites/default to sites/dept.duke.edu
update sites.php accordingly:
$sites = array(
'english.drude' => 'english.duke.edu',
);
cp default.settings.php settings.php
initialize database
Establish local theme
# Drude D7 and D8 DB connection settings.
$databases['default']['default'] = array (
'database' => getenv('DB_1_ENV_MYSQL_DATABASE'),
'username' => getenv('DB_1_ENV_MYSQL_USER'),
'password' => getenv('DB_1_ENV_MYSQL_PASSWORD'),
'host' => getenv('DB_1_PORT_3306_TCP_ADDR'),
'driver' => 'mysql',
);
# D7 Workaround for permission issues with NFS shares in Vagrant
$conf['file_chmod_directory'] = 0777;
$conf['file_chmod_file'] = 0666;
# D8 Workaround for permission issues with NFS shares in Vagrant
$settings['file_chmod_directory'] = 0777;
$settings['file_chmod_file'] = 0666;
# Some helpful D8 modules
admin_toolbar # replaces admin_menu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment