Skip to content
Snippets Groups Projects
Commit e9a3f48e authored by Chris Shantz's avatar Chris Shantz
Browse files

Updated files to use wcms-docker instead of localhost.

parent f1d8dd9c
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@
#################################
PROJECT_NAME=wcms-docker
PROJECT_BASE_URL=wcms.localhost
PROJECT_BASE_URL=wcms-docker
### Database Settings ###
......
<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
......
......@@ -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/
......
......@@ -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
......
<?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
<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
......
......@@ -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
......
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