diff --git a/.env b/.env index 135ac1e238d788b858bcd7cc2d110a1b263e30ad..cda9f4d54eb00bd1cb349d4d0e265a37a15d6a1b 100644 --- a/.env +++ b/.env @@ -7,7 +7,7 @@ ################################# PROJECT_NAME=wcms-docker -PROJECT_BASE_URL=wcms.localhost +PROJECT_BASE_URL=wcms-docker ### Database Settings ### diff --git a/build-scripts/drupal7/000-default.conf b/build-scripts/drupal7/000-default.conf index 2f50054ee262fc198af7a484ff2e080d7b8bea3f..97ecf317a19fe36b7aad1c511064e0977821855f 100644 --- a/build-scripts/drupal7/000-default.conf +++ b/build-scripts/drupal7/000-default.conf @@ -1,8 +1,8 @@ <VirtualHost *:80> DocumentRoot /var/www/drupal7 ServerAdmin webmaster@localhost - ServerName localhost - Redirect permanent / https://localhost/ + ServerName wcms-docker + Redirect permanent / https://wcms-docker/ <Directory /> Options FollowSymLinks AllowOverride None @@ -17,7 +17,7 @@ <VirtualHost *:443> ServerAdmin webmaster@localhost DocumentRoot /var/www/drupal7 - ServerName localhost + ServerName wcms-docker <Directory /> Options FollowSymLinks AllowOverride None diff --git a/build-scripts/drupal7/Dockerfile b/build-scripts/drupal7/Dockerfile index 87eb853c285fae2c9ff762005269c4df0d5c2067..583ac47783808b49ee8d460bafa59fc99e36ebc3 100644 --- a/build-scripts/drupal7/Dockerfile +++ b/build-scripts/drupal7/Dockerfile @@ -2,6 +2,7 @@ # Dockerfile to build WCMS container images # Based on Ubuntu ############################################################ + # Set the base image to Ubuntu FROM ubuntu:xenial @@ -148,36 +149,36 @@ RUN cd /var/www/drupal7 && \ ln -s . fdsu4 ## Create site folders for drupal multi-site -RUN mkdir /var/www/drupal7/sites/localhost.fdsu1 -RUN mkdir /var/www/drupal7/sites/localhost.fdsu2 -RUN mkdir /var/www/drupal7/sites/localhost.fdsu3 -RUN mkdir /var/www/drupal7/sites/localhost.fdsu4 +RUN mkdir /var/www/drupal7/sites/wcms-docker.fdsu1 +RUN mkdir /var/www/drupal7/sites/wcms-docker.fdsu2 +RUN mkdir /var/www/drupal7/sites/wcms-docker.fdsu3 +RUN mkdir /var/www/drupal7/sites/wcms-docker.fdsu4 ## Add module and file folders as well as copy the settings.php over for each site -RUN mkdir /var/www/drupal7/sites/localhost.fdsu1/files -RUN mkdir /var/www/drupal7/sites/localhost.fdsu1/modules +RUN mkdir /var/www/drupal7/sites/wcms-docker.fdsu1/files +RUN mkdir /var/www/drupal7/sites/wcms-docker.fdsu1/modules ## Create settings.php file -COPY settings.conf /var/www/drupal7/sites/localhost.fdsu1/settings.php -RUN mkdir /var/www/drupal7/sites/localhost.fdsu2/files -RUN mkdir /var/www/drupal7/sites/localhost.fdsu2/modules +COPY settings.conf /var/www/drupal7/sites/wcms-docker.fdsu1/settings.php +RUN mkdir /var/www/drupal7/sites/wcms-docker.fdsu2/files +RUN mkdir /var/www/drupal7/sites/wcms-docker.fdsu2/modules ## Create settings.php file -COPY settings.conf /var/www/drupal7/sites/localhost.fdsu2/settings.php -RUN mkdir /var/www/drupal7/sites/localhost.fdsu3/files -RUN mkdir /var/www/drupal7/sites/localhost.fdsu3/modules +COPY settings.conf /var/www/drupal7/sites/wcms-docker.fdsu2/settings.php +RUN mkdir /var/www/drupal7/sites/wcms-docker.fdsu3/files +RUN mkdir /var/www/drupal7/sites/wcms-docker.fdsu3/modules ## Create settings.php file COPY settings.conf /var/www/drupal7/sites/d7.fdsu3/settings.php -RUN mkdir /var/www/drupal7/sites/localhost.fdsu4/files -RUN mkdir /var/www/drupal7/sites/localhost.fdsu4/modules +RUN mkdir /var/www/drupal7/sites/wcms-docker.fdsu4/files +RUN mkdir /var/www/drupal7/sites/wcms-docker.fdsu4/modules ## Create settings.php file -COPY settings.conf /var/www/drupal7/sites/localhost.fdsu1/settings.php -COPY settings.conf /var/www/drupal7/sites/localhost.fdsu2/settings.php -RUN cd /var/www/drupal7/sites/localhost.fdsu2 && \ +COPY settings.conf /var/www/drupal7/sites/wcms-docker.fdsu1/settings.php +COPY settings.conf /var/www/drupal7/sites/wcms-docker.fdsu2/settings.php +RUN cd /var/www/drupal7/sites/wcms-docker.fdsu2 && \ sed -i 's/fdsu1/fdsu2/g' settings.php -COPY settings.conf /var/www/drupal7/sites/localhost.fdsu3/settings.php -RUN cd /var/www/drupal7/sites/localhost.fdsu3 && \ +COPY settings.conf /var/www/drupal7/sites/wcms-docker.fdsu3/settings.php +RUN cd /var/www/drupal7/sites/wcms-docker.fdsu3 && \ sed -i 's/fdsu1/fdsu3/g' settings.php -COPY settings.conf /var/www/drupal7/sites/localhost.fdsu4/settings.php -RUN cd /var/www/drupal7/sites/localhost.fdsu4 && \ +COPY settings.conf /var/www/drupal7/sites/wcms-docker.fdsu4/settings.php +RUN cd /var/www/drupal7/sites/wcms-docker.fdsu4 && \ sed -i 's/fdsu1/fdsu4/g' settings.php ## Get the base profile from git @@ -185,11 +186,11 @@ RUN git clone https://git.uwaterloo.ca/wcms/uw_base_profile.git /var/www/drupal7 RUN chown -R vagrant:www-data /var/www/drupal7/profiles/uw_base_profile RUN chmod -R g+w /var/www/drupal7/profiles/uw_base_profile ## Rebuild the profile to get the latest modules -RUN ls /var/www/drupal7/profiles/uw_base_profile -RUN /var/www/drupal7/profiles/uw_base_profile/rebuild.sh +#RUN cd /var/www/drupal7/profiles/uw_base_profile +#RUN /var/www/drupal7/profiles/uw_base_profile/rebuild.sh ## Add the Servername to the apache2 conf file. -## RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf +## RUN echo "ServerName wcms-docker" >> /etc/apache2/apache2.conf # Copy our custom entrypoint and make it executable. COPY docker-entrypoint-d7.sh /usr/local/bin/ diff --git a/build-scripts/drupal7/docker-entrypoint-d7.sh b/build-scripts/drupal7/docker-entrypoint-d7.sh index 6222ee9c2e213d05c4770289d9e91d7af836e0bf..17766a0702c883dab7375ecdae8857af0dc51d4f 100644 --- a/build-scripts/drupal7/docker-entrypoint-d7.sh +++ b/build-scripts/drupal7/docker-entrypoint-d7.sh @@ -24,14 +24,14 @@ if [ -n "$APACHE_SITE_NAME" ]; then fi # Allow for site aliases to be provided. -APACHE_SITE_ALIAS="${APACHE_SITE_ALIAS:-docker.localhost}" +APACHE_SITE_ALIAS="${APACHE_SITE_ALIAS:-wcms-docker}" if [ -n "$APACHE_SITE_ALIAS" ]; then sed -i 's@^\s*ServerAlias.*@'" ServerAlias ${APACHE_SITE_ALIAS}"'@' /etc/apache2/sites-available/000-default.conf fi ## Change default PHP to 5.6 (just to be sure). -a2dismod php7.2 && a2enmod php5.6 && update-alternatives --set php /usr/bin/php5.6 && service apache2 restart +#a2dismod php7.2 && a2enmod php5.6 && update-alternatives --set php /usr/bin/php5.6 && service apache2 restart ## Change permissions on /var/www/drupal7 chown -R vagrant:www-data /var/www/drupal7 diff --git a/build-scripts/drupal7/settings.conf b/build-scripts/drupal7/settings.conf index b536bf588ad24b071d2158000d53875a9a8fa0a8..e397ea580a215e390d09ea50371efe2c8662acf3 100644 --- a/build-scripts/drupal7/settings.conf +++ b/build-scripts/drupal7/settings.conf @@ -1,7 +1,7 @@ <?php // Server domain name. -$UWhost = 'localhost:4443'; +$UWhost = 'wcms-docker:4443'; // Path to site root. $UWpref = 'fdsu1'; // Name of site database. @@ -17,8 +17,8 @@ require_once(DRUPAL_ROOT . '/profiles/uw_base_profile/drupal-settings.php'); // File system. $conf['file_default_scheme'] = 'public'; -$conf['file_private_path'] = '/var/www/drupal7/sites/localhost.fdsu1/files/private/'; -$conf['file_public_path'] = '/var/www/drupal7/sites/localhost.fdsu1/files'; -$conf['file_temporary_path'] = '/var/www/drupal7/sites/localhost.fdsu1/files/temp/'; +$conf['file_private_path'] = '/var/www/drupal7/sites/wcms-docker.fdsu1/files/private/'; +$conf['file_public_path'] = '/var/www/drupal7/sites/wcms-docker.fdsu1/files'; +$conf['file_temporary_path'] = '/var/www/drupal7/sites/wcms-docker.fdsu1/files/temp/'; unset ($conf['file_chmod_directory']); unset ($conf['file_chmod_file']); \ No newline at end of file diff --git a/build-scripts/drupal8/000-default.conf b/build-scripts/drupal8/000-default.conf index 63af20429f89dafc7bdee6e1513cb5ce0d7ab750..11cca222b80df2f656df2635f21768684e290eac 100644 --- a/build-scripts/drupal8/000-default.conf +++ b/build-scripts/drupal8/000-default.conf @@ -1,8 +1,8 @@ <VirtualHost *:80> DocumentRoot /var/www/drupal8 ServerAdmin webmaster@localhost - ServerName localhost - Redirect permanent / https://localhost/ + ServerName wcms-docker + Redirect permanent / https://wcms-docker/ <Directory /> Options FollowSymLinks AllowOverride None @@ -17,7 +17,7 @@ <VirtualHost *:443> ServerAdmin webmaster@localhost DocumentRoot /var/www/drupal8 - ServerName localhost + ServerName wcms-docker <Directory /> Options FollowSymLinks AllowOverride None diff --git a/build-scripts/drupal8/docker-entrypoint.sh b/build-scripts/drupal8/docker-entrypoint.sh index 5ee7a61277b3bee100662980d9e9d910c30c98f9..bdca697d7549c7a60d05e97e33c72b97b2bc9d44 100644 --- a/build-scripts/drupal8/docker-entrypoint.sh +++ b/build-scripts/drupal8/docker-entrypoint.sh @@ -30,7 +30,7 @@ if [ -n "$APACHE_SITE_NAME" ]; then fi # Allow for site aliases to be provided. -APACHE_SITE_ALIAS="${APACHE_SITE_ALIAS:-docker.localhost}" +APACHE_SITE_ALIAS="${APACHE_SITE_ALIAS:-wcms-docker}" if [ -n "$APACHE_SITE_ALIAS" ]; then sed -i 's@^\s*ServerAlias.*@'" ServerAlias ${APACHE_SITE_ALIAS}"'@' /etc/apache2/sites-available/000-default.conf