Commit 12cb178f authored by Chris Shantz's avatar Chris Shantz

Merge branch 'path-reload-hotfix' into 'wcms-dev-2.x'

Path reload hotfix

See merge request !5
parents 6472f015 d21de39a
......@@ -11,12 +11,10 @@ set -e
a2ensite drupal7.conf drupal7alt.conf
a2enconf wcms-common
## Change permissions on /var/www/drupal7
chown -R vagrant:www-data /var/www/drupal7
chmod -R g+w /var/www/drupal7
chown -R vagrant:www-data /var/www/drupal7alt
chmod -R g+w /var/www/drupal7alt
## Change permissions on /var/www/drupal7 etc.
chown -R vagrant:www-data /var/www/
chmod -R 775 /var/www/
chmod +t /var/www
## increase the size of the git http buffer to prevent the remote end hung up unexpectedly error
git config --global http.postBuffer 1048576000
......
......@@ -11,12 +11,10 @@ set -e
a2ensite drupal7.conf drupal7alt.conf
a2enconf wcms-common
## Change permissions on /var/www/drupal7
chown -R www-data:www-data /var/www/drupal7
chmod -R g+w /var/www/drupal7
chown -R www-data:www-data /var/www/drupal7alt
chmod -R g+w /var/www/drupal7alt
## Change permissions on /var/www/drupal7 etc.
chown -R vagrant:www-data /var/www/
chmod -R 775 /var/www/
chmod +t /var/www
## increase the size of the git http buffer to prevent the remote end hung up unexpectedly error
git config --global http.postBuffer 1048576000
......
......@@ -17,8 +17,9 @@ a2ensite drupal7os.conf
a2enconf wcms-common
## Change permissions on /var/www/drupal7
chown -R www-data:www-data /var/www/drupal7os
chmod -R g+w /var/www/drupal7os
chown -R vagrant:www-data /var/www/
chmod -R g+w /var/www/
chmod +t /var/www
# Now that we're set up, run whatever command was passed to the entrypoint.
exec "$@"
......@@ -18,7 +18,7 @@ a2enconf wcms-common
## Change permissions on /var/www/drupal8 etc
chown -R vagrant:www-data /var/www/
chmod -R 775 /var/www/
chmod +t /var/www
## increase the size of the git http buffer to prevent the remote end hung up unexpectedly error
git config --global http.postBuffer 1048576000
......
#!/bin/bash
START=$(date +%s)
## Remove the Drupal7 folder so we can download drupal directly into it instead of having to overwrite the dir
rm -rf /var/www/drupal7
composer global require drush/drush:8.*
composer global update
echo 'PATH="$HOME/.composer/vendor/bin:$PATH"' >> /home/vagrant/.bashrc
echo 'PATH="$HOME/.composer/vendor/bin:$PATH"' >> /home/vagrant/.profile
## Restart the bashrc file for the changes to take affect
/bin/bash -c "source /home/vagrant/.bashrc"
source ~/.profile
## Install the drush registry_rebuild module
drush @none dl registry_rebuild-7.x
## Download Drupal and then copy it to the drupal7alt folder
drush dl -v -d drupal-7.65 --destination="/var/www" --drupal-project-rename="drupal7" -y
cp -r /var/www/drupal7/. /var/www/drupal7alt
......@@ -18,6 +29,11 @@ touch /var/www/drupal7alt/config/password_settings.php
mkdir /var/www/drupal7/fonts
mkdir /var/www/drupal7alt/fonts
## Create the sites folders
mkdir /var/www/drupal7/sites
mkdir /var/www/drupal7alt/sites
## Create symlinks for Drupal multi-site so apache can route things
cd /var/www/drupal7
ln -s . fdsu1
......@@ -160,14 +176,13 @@ sed -i 's/fdsu1/fdsu5/g' settings.php
## Get the base profile from git
git clone https://git.uwaterloo.ca/wcms/uw_base_profile.git /var/www/drupal7/profiles/uw_base_profile
chown -R www-data:www-data /var/www/drupal7/profiles/uw_base_profile
chown -R vagrant:www-data /var/www/drupal7/profiles/uw_base_profile
chmod -R g+w /var/www/drupal7/profiles/uw_base_profile
git clone https://git.uwaterloo.ca/wcms/uw_base_profile.git /var/www/drupal7alt/profiles/uw_base_profile
chown -R www-data:www-data /var/www/drupal7alt/profiles/uw_base_profile
chown -R vagrant:www-data /var/www/drupal7alt/profiles/uw_base_profile
chmod -R g+w /var/www/drupal7alt/profiles/uw_base_profile
cp /usr/local/bin/bash_aliases/wcms-bash-alias-d7.sh /root/.bash_aliases
cp /usr/local/bin/bash_aliases/wcms-bash-alias-d7.sh /home/vagrant/.bash_aliases
echo "Alias file copied..."
echo "for the aliases to take effect, you will need to restart bash"
......@@ -175,5 +190,12 @@ echo "source ~/.bash_aliases"
cd /var/www/drupal7/profiles/uw_base_profile
./rebuild.sh
chown -R vagrant:www-data /var/www
END=$(date +%s)
DIFF=$(( $END - $START ))
echo "It took $DIFF seconds"
DIFF2=$(($DIFF/60))
echo "It took roughly $DIFF2 minutes"
echo "You are now ready to start developing!"
#!/bin/bash
START=$(date +%s)
## Remove the Drupal8 folder so we can download drupal directly into it instead
# of having to overwrite the directory. This worked in theory once, now it seems
# to say that it can't be deleted because it is in use/busy.
......@@ -16,13 +16,6 @@ git clone https://git.uwaterloo.ca/wcms/uw_base_profile.git
cd /var/www/drupal8/profiles/uw_base_profile
git checkout 8.x-3.x
## Create the settings.php file
## Commentiing out temporarily because I think this is from
# when we started drupal 8 and didn't have our own profile.
# cd /var/www/drupal8/sites/default
# cp default.settings.php settings.php
## Add the links for drupal multi-site to work
cd /var/www/drupal8
ln -s . fdsu1
......@@ -34,6 +27,10 @@ ln -s . fdsu5
## cp the sites.php file to the Drupal 8 sites folder.
cp /var/www/wcms-settings/sites.php /var/www/drupal8/sites
## Create the sites folders
mkdir /var/www/drupal8/sites
mkdir /var/www/drupal8alt/sites
## Create site folders for drupal multi-site
mkdir /var/www/drupal8/sites/wcms8.fdsu1
mkdir /var/www/drupal8/sites/wcms8.fdsu1/files
......@@ -229,6 +226,13 @@ chmod -R 775 /var/www/drupal8alt
## Copy the alias file we created to the correct spot (since our previous method stopped working)
cp /usr/local/bin/bash_aliases/wcms-bash-alias-d8.sh /root/.bash_aliases
cp /usr/local/bin/bash_aliases/wcms-bash-alias-d8.sh /home/vagrant/.bash_aliases
## Check to see how long it took to build the file
END=$(date +%s)
DIFF=$(( $END - $START ))
echo "It took $DIFF seconds"
DIFF2=$(($DIFF/60))
echo "It took roughly $DIFF2 minutes"
echo "Alias file copied..."
echo "for the aliases to take effect, you will need to restart bash"
echo "source ~/.bash_aliases"
......
......@@ -2,7 +2,7 @@
echo''
echo '====================================================================================='
echo ' '
echo '** Warning ** Running this script could shut down docker and remove all local content!'
echo '** Warning ** Running this script could shut down docker, docker-sync and remove all local content!'
echo ''
echo 'Proceed with caution...'
echo ' '
......@@ -10,9 +10,9 @@ echo '==========================================================================
echo''
echo "Continuing will remove content for your wcms-docker install (unless you choose option 3). Select 1, 2, or 3."
echo''
option1="Shutdown docker and remove everything"
option2="Do not shutdown Docker but remove WCMS content and databases"
option3="Do not shutdown docker or remove anything"
option1="Shutdown docker and docker-sync and remove everything"
option2="Do not shutdown Docker but remove WCMS content and databases from the _local folders"
option3="Get me out of here! Do not shutdown docker or remove anything"
select option in "${option1}" "${option2}" "${option3}" ##"Shutdown docker and remove everything" "Remove WCMS content" "Do not shutdown or remove anything"
do
case $option in
......@@ -32,8 +32,7 @@ do
rm -rf ./build-scripts/drupal8/drupal8_local/.*
rm -rf ./build-scripts/drupal8/drupal8alt_local/.*; break;;
$option2 ) docker-sync clean
rm -rf ./mysql/provision/*
$option2 ) rm -rf ./mysql/provision/*
rm -rf ./build-scripts/drupal7/drupal7_local/*
rm -rf ./build-scripts/drupal7/drupal7_local/.*
rm -rf ./build-scripts/drupal7/drupal7alt_local/*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment