From 46ce9a13beae1a3c5277847699233af505eb1f95 Mon Sep 17 00:00:00 2001
From: mnshantz <mnshantz@uwaterloo.ca>
Date: Fri, 8 Feb 2019 14:38:04 -0500
Subject: [PATCH] Updated docker-compose and .env for new wcms7.1 container and
 updated dockerfile to fix issue with base_url.

---
 .env                                       | 13 +++-
 build-scripts/drupal7/Dockerfile           | 66 +++++++++++---------
 build-scripts/drupal7/servername.conf      |  1 +
 build-scripts/drupal8/Dockerfile           | 72 ++++++++++++----------
 build-scripts/drupal8/docker-entrypoint.sh | 14 +----
 build-scripts/drupal8/servername.conf      |  1 +
 build-scripts/drupal8/settings.conf        | 12 ++--
 docker-compose.yml                         | 35 ++++++++---
 8 files changed, 123 insertions(+), 91 deletions(-)
 create mode 100644 build-scripts/drupal7/servername.conf
 create mode 100644 build-scripts/drupal8/servername.conf

diff --git a/.env b/.env
index cda9f4d..b619033 100644
--- a/.env
+++ b/.env
@@ -6,7 +6,10 @@
 ### Project Settings ###
 #################################
 
+## Project Name is used for your containers so they are unique for each project
 PROJECT_NAME=wcms-docker
+
+## Project Base URL is used for the URL and would need to be added to the Host file
 PROJECT_BASE_URL=wcms-docker
 
 
@@ -19,7 +22,7 @@ DB_PASSWORD=vagrant
 DB_ROOT_PASSWORD=root
 DB_HOST=mariadb
 DB_DRIVER=mysql
-DB_ADDITIONAL=d7_fdsu1 d7_fdsu2 d7_fdsu3 d7_fdsu4 d8_fdsu2 d8_fdsu3 d8_fdsu4
+DB_ADDITIONAL=d7_fdsu1 d7_fdsu2 d7_fdsu3 d7_fdsu4 d8_fdsu2 d8_fdsu3 d8_fdsu4 d71_fdsu1 d71_fdsu2 d71_fdsu3 d71_fdsu4
 
 
 ### PHP Setttings ###
@@ -31,6 +34,10 @@ PHP_VERSION=5.6
 #PHP_VERSION=7.2
 #PHP_VERSION=7.3
 
+PHP_VERSION_ALT=7.1
+#PHP_VERSION_ALT=7.2
+#PHP_VERSION_ALT=7.3
+
 #PHP_VERSION8=7.1
 PHP_VERSION8=7.2
 #PHP_VERSION8=7.3
@@ -38,9 +45,9 @@ PHP_VERSION8=7.2
 ### DRUPAL settings ###
 ##################################
 
-DRUPAL7_VERSION=7.63
+DRUPAL7_VERSION=7.64
 
-DRUPAL8_VERSION=8.6.7
+DRUPAL8_VERSION=8.6.9
 
 
 
diff --git a/build-scripts/drupal7/Dockerfile b/build-scripts/drupal7/Dockerfile
index 583ac47..c2db3d0 100644
--- a/build-scripts/drupal7/Dockerfile
+++ b/build-scripts/drupal7/Dockerfile
@@ -9,9 +9,11 @@ FROM ubuntu:xenial
 # Pass the argument variables from the docker-compose file to the Dockerfile and echo them out
 ARG PHP_VERSION
 ARG DRUPAL7_VERSION
+ARG PROJECT_BASE_URL
 
 RUN echo "PHP version: $PHPVERSION"
 RUN echo "Drupal 7 version: $DRUPAL7_VERSION"
+RUN echo "Project base URL: $PROJECT_BASE_URL"
 
 # Allows installing of packages without prompting the user to answer any questions
 ENV DEBIAN_FRONTEND noninteractive
@@ -68,7 +70,6 @@ RUN apt-get install -y \
     curl \
     mysql-client \
     openssh-server \
-    phpmyadmin \
     wget \
     ruby-sass \
     ruby-compass \
@@ -119,7 +120,7 @@ RUN a2enmod proxy_fcgi setenvif
 RUN a2enconf php${PHP_VERSION}-fpm
 RUN service php${PHP_VERSION}-fpm restart
 
-## Make sure we are running php5.6
+## Make sure we are running php we selected
 RUN update-alternatives --set php /usr/bin/php${PHP_VERSION}
 RUN a2enmod php${PHP_VERSION}
 RUN service apache2 restart
@@ -149,38 +150,39 @@ RUN cd /var/www/drupal7 && \
     ln -s . fdsu4
 
 ## Create site folders for drupal multi-site
-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/wcms-docker.fdsu1/files
-RUN mkdir /var/www/drupal7/sites/wcms-docker.fdsu1/modules
+RUN mkdir /var/www/drupal7/sites/${PROJECT_BASE_URL}.fdsu1 
+RUN mkdir /var/www/drupal7/sites/${PROJECT_BASE_URL}.fdsu1/files 
+RUN mkdir /var/www/drupal7/sites/${PROJECT_BASE_URL}.fdsu1/files/temp
+RUN mkdir /var/www/drupal7/sites/${PROJECT_BASE_URL}.fdsu1/modules
 ## Create settings.php file
-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
+COPY settings.conf /var/www/drupal7/sites/${PROJECT_BASE_URL}.fdsu1/settings.php
+RUN mkdir /var/www/drupal7/sites/${PROJECT_BASE_URL}.fdsu2 
+RUN mkdir /var/www/drupal7/sites/${PROJECT_BASE_URL}.fdsu2/files
+RUN mkdir /var/www/drupal7/sites/${PROJECT_BASE_URL}.fdsu2/files/temp
+RUN mkdir /var/www/drupal7/sites/${PROJECT_BASE_URL}.fdsu2/modules
 ## Create settings.php file
-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/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/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 && \
+COPY settings.conf /var/www/drupal7/sites/${PROJECT_BASE_URL}.fdsu2/settings.php
+## Change sitename to match site
+RUN cd /var/www/drupal7/sites/${PROJECT_BASE_URL}.fdsu2 && \
     sed -i 's/fdsu1/fdsu2/g' settings.php
-COPY settings.conf /var/www/drupal7/sites/wcms-docker.fdsu3/settings.php
-RUN cd /var/www/drupal7/sites/wcms-docker.fdsu3 && \
+RUN mkdir /var/www/drupal7/sites/${PROJECT_BASE_URL}.fdsu3
+RUN mkdir /var/www/drupal7/sites/${PROJECT_BASE_URL}.fdsu3/files
+RUN mkdir /var/www/drupal7/sites/${PROJECT_BASE_URL}.fdsu3/files/temp
+RUN mkdir /var/www/drupal7/sites/${PROJECT_BASE_URL}.fdsu3/modules
+## Create settings.php file
+COPY settings.conf /var/www/drupal7/sites/${PROJECT_BASE_URL}.fdsu3/settings.php
+## Change sitename to match site
+RUN cd /var/www/drupal7/sites/${PROJECT_BASE_URL}.fdsu3 && \
     sed -i 's/fdsu1/fdsu3/g' settings.php
-COPY settings.conf /var/www/drupal7/sites/wcms-docker.fdsu4/settings.php
-RUN cd /var/www/drupal7/sites/wcms-docker.fdsu4 && \
+RUN mkdir /var/www/drupal7/sites/${PROJECT_BASE_URL}.fdsu4
+RUN mkdir /var/www/drupal7/sites/${PROJECT_BASE_URL}.fdsu4/files
+RUN mkdir /var/www/drupal7/sites/${PROJECT_BASE_URL}.fdsu4/files/temp
+RUN mkdir /var/www/drupal7/sites/${PROJECT_BASE_URL}.fdsu4/modules
+## Create settings.php file
+COPY settings.conf /var/www/drupal7/sites/${PROJECT_BASE_URL}.fdsu4/settings.php
+## Change sitename to match site
+RUN cd /var/www/drupal7/sites/${PROJECT_BASE_URL}.fdsu4 && \
     sed -i 's/fdsu1/fdsu4/g' settings.php
-
 ## Get the base profile from git
 RUN git clone https://git.uwaterloo.ca/wcms/uw_base_profile.git /var/www/drupal7/profiles/uw_base_profile
 RUN chown -R vagrant:www-data /var/www/drupal7/profiles/uw_base_profile
@@ -190,7 +192,7 @@ RUN chmod -R g+w /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 wcms-docker" >> /etc/apache2/apache2.conf
+## RUN echo "ServerName ${PROJECT_BASE_URL}" >> /etc/apache2/apache2.conf
 
 # Copy our custom entrypoint and make it executable.
 COPY docker-entrypoint-d7.sh /usr/local/bin/
@@ -209,6 +211,10 @@ RUN sed -i "s/display_errors = .*/display_errors = On/" /etc/php/${PHP_VERSION}/
     sed -i "s/; max_input_vars = .*/max_input_vars = 10000/" /etc/php/${PHP_VERSION}/apache2/php.ini && \
     sed -i "s/;date.timezone = */date.timezone = America\/Toronto/" /etc/php/${PHP_VERSION}/apache2/php.ini && \
     sed -i "s/;date.timezone = */date.timezone = America\/Toronto/" /etc/php/${PHP_VERSION}/cli/php.ini
+    
+COPY servername.conf /etc/apache2/conf-available
+RUN a2enconf servername
+
 
 # Expose the default Apache port.
 EXPOSE 80
diff --git a/build-scripts/drupal7/servername.conf b/build-scripts/drupal7/servername.conf
new file mode 100644
index 0000000..1f4ed32
--- /dev/null
+++ b/build-scripts/drupal7/servername.conf
@@ -0,0 +1 @@
+ServerName wcms-docker
\ No newline at end of file
diff --git a/build-scripts/drupal8/Dockerfile b/build-scripts/drupal8/Dockerfile
index 0bd16c2..d6dd8f2 100644
--- a/build-scripts/drupal8/Dockerfile
+++ b/build-scripts/drupal8/Dockerfile
@@ -8,9 +8,11 @@ FROM ubuntu:xenial
 # Pass the argument variables from the docker-compose file to the Dockerfile and echo them out
 ARG PHP_VERSION8
 ARG DRUPAL8_VERSION
+ARG PROJECT_BASE_URL
 
-RUN echo "PHP version: ${PHPVERSION8}"
-RUN echo "Drupal 8 version: ${DRUPAL8_VERSION}"
+RUN echo "PHP version: $PHPVERSION8"
+RUN echo "Drupal 8 version: $DRUPAL8_VERSION"
+RUN echo "Project base URL: $PROJECT_BASE_URL"
 
 # Allows installing of packages without prompting the user to answer any questions
 ENV DEBIAN_FRONTEND noninteractive
@@ -156,52 +158,56 @@ RUN cd /var/www/drupal8 && \
 ## Copy the sites.php file to the Drupal 8 sites folder.
 COPY sites.php /var/www/drupal8/sites 
 
-RUN mkdir /var/www/drupal8/sites/localhost.fdsu1 
-RUN mkdir /var/www/drupal8/sites/localhost.fdsu1/files 
-RUN mkdir /var/www/drupal8/sites/localhost.fdsu1/files/temp
-RUN mkdir /var/www/drupal8/sites/localhost.fdsu1/modules
+RUN mkdir /var/www/drupal8/sites/${PROJECT_BASE_URL}.fdsu1 
+RUN mkdir /var/www/drupal8/sites/${PROJECT_BASE_URL}.fdsu1/files 
+RUN mkdir /var/www/drupal8/sites/${PROJECT_BASE_URL}.fdsu1/files/temp
+RUN mkdir /var/www/drupal8/sites/${PROJECT_BASE_URL}.fdsu1/modules
 ## Create settings.php file
-COPY settings.conf /var/www/drupal8/sites/localhost.fdsu1/settings.php
-RUN mkdir /var/www/drupal8/sites/localhost.fdsu2 
-RUN mkdir /var/www/drupal8/sites/localhost.fdsu2/files
-RUN mkdir /var/www/drupal8/sites/localhost.fdsu2/files/temp
-RUN mkdir /var/www/drupal8/sites/localhost.fdsu2/modules
+COPY settings.conf /var/www/drupal8/sites/${PROJECT_BASE_URL}.fdsu1/settings.php
+RUN mkdir /var/www/drupal8/sites/${PROJECT_BASE_URL}.fdsu2 
+RUN mkdir /var/www/drupal8/sites/${PROJECT_BASE_URL}.fdsu2/files
+RUN mkdir /var/www/drupal8/sites/${PROJECT_BASE_URL}.fdsu2/files/temp
+RUN mkdir /var/www/drupal8/sites/${PROJECT_BASE_URL}.fdsu2/modules
 ## Create settings.php file
-COPY settings.conf /var/www/drupal8/sites/localhost.fdsu2/settings.php
+COPY settings.conf /var/www/drupal8/sites/${PROJECT_BASE_URL}.fdsu2/settings.php
 ## Change sitename to match site
-RUN cd /var/www/drupal8/sites/localhost.fdsu2 && \
+RUN cd /var/www/drupal8/sites/${PROJECT_BASE_URL}.fdsu2 && \
     sed -i 's/fdsu1/fdsu2/g' settings.php
-RUN mkdir /var/www/drupal8/sites/localhost.fdsu3
-RUN mkdir /var/www/drupal8/sites/localhost.fdsu3/files
-RUN mkdir /var/www/drupal8/sites/localhost.fdsu3/files/temp
-RUN mkdir /var/www/drupal8/sites/localhost.fdsu3/modules
+RUN mkdir /var/www/drupal8/sites/${PROJECT_BASE_URL}.fdsu3
+RUN mkdir /var/www/drupal8/sites/${PROJECT_BASE_URL}.fdsu3/files
+RUN mkdir /var/www/drupal8/sites/${PROJECT_BASE_URL}.fdsu3/files/temp
+RUN mkdir /var/www/drupal8/sites/${PROJECT_BASE_URL}.fdsu3/modules
 ## Create settings.php file
-COPY settings.conf /var/www/drupal8/sites/localhost.fdsu3/settings.php
+COPY settings.conf /var/www/drupal8/sites/${PROJECT_BASE_URL}.fdsu3/settings.php
 ## Change sitename to match site
-RUN cd /var/www/drupal8/sites/localhost.fdsu3 && \
+RUN cd /var/www/drupal8/sites/${PROJECT_BASE_URL}.fdsu3 && \
     sed -i 's/fdsu1/fdsu3/g' settings.php
-RUN mkdir /var/www/drupal8/sites/localhost.fdsu4
-RUN mkdir /var/www/drupal8/sites/localhost.fdsu4/files
-RUN mkdir /var/www/drupal8/sites/localhost.fdsu4/files/temp
-RUN mkdir /var/www/drupal8/sites/localhost.fdsu4/modules
+RUN mkdir /var/www/drupal8/sites/${PROJECT_BASE_URL}.fdsu4
+RUN mkdir /var/www/drupal8/sites/${PROJECT_BASE_URL}.fdsu4/files
+RUN mkdir /var/www/drupal8/sites/${PROJECT_BASE_URL}.fdsu4/files/temp
+RUN mkdir /var/www/drupal8/sites/${PROJECT_BASE_URL}.fdsu4/modules
 ## Create settings.php file
-COPY settings.conf /var/www/drupal8/sites/localhost.fdsu4/settings.php
+COPY settings.conf /var/www/drupal8/sites/${PROJECT_BASE_URL}.fdsu4/settings.php
 ## Change sitename to match site
-RUN cd /var/www/drupal8/sites/localhost.fdsu4 && \
+RUN cd /var/www/drupal8/sites/${PROJECT_BASE_URL}.fdsu4 && \
     sed -i 's/fdsu1/fdsu4/g' settings.php
-RUN mkdir /var/www/drupal8/sites/localhost.fdsu1/files/config_acqTmp && \
-    mkdir /var/www/drupal8/sites/localhost.fdsu1/files/config_acqTmp/sync
-RUN mkdir /var/www/drupal8/sites/localhost.fdsu2/files/config_acqTmp && \
-    mkdir /var/www/drupal8/sites/localhost.fdsu2/files/config_acqTmp/sync
-RUN mkdir /var/www/drupal8/sites/localhost.fdsu3/files/config_acqTmp && \
-    mkdir /var/www/drupal8/sites/localhost.fdsu3/files/config_acqTmp/sync
-RUN mkdir /var/www/drupal8/sites/localhost.fdsu4/files/config_acqTmp && \
-    mkdir /var/www/drupal8/sites/localhost.fdsu4/files/config_acqTmp/sync
+RUN mkdir /var/www/drupal8/sites/${PROJECT_BASE_URL}.fdsu1/files/config_acqTmp && \
+    mkdir /var/www/drupal8/sites/${PROJECT_BASE_URL}.fdsu1/files/config_acqTmp/sync
+RUN mkdir /var/www/drupal8/sites/${PROJECT_BASE_URL}.fdsu2/files/config_acqTmp && \
+    mkdir /var/www/drupal8/sites/${PROJECT_BASE_URL}.fdsu2/files/config_acqTmp/sync
+RUN mkdir /var/www/drupal8/sites/${PROJECT_BASE_URL}.fdsu3/files/config_acqTmp && \
+    mkdir /var/www/drupal8/sites/${PROJECT_BASE_URL}.fdsu3/files/config_acqTmp/sync
+RUN mkdir /var/www/drupal8/sites/${PROJECT_BASE_URL}.fdsu4/files/config_acqTmp && \
+    mkdir /var/www/drupal8/sites/${PROJECT_BASE_URL}.fdsu4/files/config_acqTmp/sync
 
 # Add Drupal permissions to the drupal folder
 RUN chown -R vagrant:www-data /var/www/drupal8
 RUN chmod -R g+w /var/www/drupal8
 
+COPY servername.conf /etc/apache2/conf-available
+RUN a2enconf servername
+
+
 # Expose the default Apache port.
 EXPOSE 80
 EXPOSE 443
diff --git a/build-scripts/drupal8/docker-entrypoint.sh b/build-scripts/drupal8/docker-entrypoint.sh
index bdca697..47748c0 100644
--- a/build-scripts/drupal8/docker-entrypoint.sh
+++ b/build-scripts/drupal8/docker-entrypoint.sh
@@ -11,12 +11,6 @@ if [ -f /run/apache2/apache2.pid ]; then
     rm /run/apache2/apache2.pid
 fi
 
-## Setup Drupal8 and Patternlab.
-#cd /var/www/drupal8/profiles/uw_base_profile
-#apt-get install composer
-#composer config --global github-oauth.github.com 5e7a5890e9935f4a03a3785e11816851430e930c
-#./rebuild.sh -y > tmp/profile-build.log
-
 # Allow the Apache docroot to be overridden.
 APACHE_DOCROOT_DIR="${APACHE_DOCROOT_DIR:-/var/www/drupal8}"
 if [ -n "$APACHE_DOCROOT_DIR" ]; then
@@ -24,21 +18,17 @@ if [ -n "$APACHE_DOCROOT_DIR" ]; then
 fi
 
 # Allow the site name to be overriden.
-APACHE_SITE_NAME="${APACHE_SITE_NAME:-docker}"
+APACHE_SITE_NAME="${APACHE_SITE_NAME:wcms-docker}"
 if [ -n "$APACHE_SITE_NAME" ]; then
      sed -i 's@^\s*ServerName.*@'"        ServerName ${APACHE_SITE_NAME}"'@'  /etc/apache2/sites-available/000-default.conf
 fi
 
 # Allow for site aliases to be provided.
-APACHE_SITE_ALIAS="${APACHE_SITE_ALIAS:-wcms-docker}"
+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
 
-## Set permissions for drupal8 and html folder
-chown -R vagrant:www-data /var/www
-chmod -R g+w /var/www
-
 # Now that we're set up, run whatever command was passed to the entrypoint.
 exec "$@"
diff --git a/build-scripts/drupal8/servername.conf b/build-scripts/drupal8/servername.conf
new file mode 100644
index 0000000..1f4ed32
--- /dev/null
+++ b/build-scripts/drupal8/servername.conf
@@ -0,0 +1 @@
+ServerName wcms-docker
\ No newline at end of file
diff --git a/build-scripts/drupal8/settings.conf b/build-scripts/drupal8/settings.conf
index 56f9ae6..ed598f1 100644
--- a/build-scripts/drupal8/settings.conf
+++ b/build-scripts/drupal8/settings.conf
@@ -1,6 +1,6 @@
 <?php
 // Server domain name.
-$UWhost = 'localhost:4444';
+$UWhost = 'wcms-docker:4444';
 // Path to site root.
 $UWpref = 'fdsu1';
 // Name of site database.
@@ -16,17 +16,17 @@ require_once(DRUPAL_ROOT . '/profiles/uw_base_profile/drupal-settings.php');
 
 // File system settings.
 $settings['file_default_scheme'] = 'public';
-$settings['file_private_path'] = 'sites/localhost.fdsu1/files/private/';
-$settings['file_public_path'] = 'sites/localhost.fdsu1/files';
-$settings['file_temporary_path'] = 'sites/localhost.fdsu1/files/temp/';
+$settings['file_private_path'] = 'sites/wcms-docker.fdsu1/files/private/';
+$settings['file_public_path'] = 'sites/wcms-docker.fdsu1/files';
+$settings['file_temporary_path'] = 'sites/wcms-docker.fdsu1/files/temp/';
 $settings['file_chmod_directory'] = 02775;
 $settings['file_chmod_file'] = 0664;
 
 // D8 required settings.
 $settings['hash_salt'] = 'N2I1NDliYWNjNGJjYzUzODc0MDg3NTc2MTgwMGMyZTdhZGZiZGE5YTdkZGU4YTExMGZkNjhhMT';
 $settings['install_profile'] = 'uw_base_profile';
-$settings['trusted_host_patterns'] = ['^localhost$',];
-$config_directories['sync'] = 'sites/localhost.fdsu1/files/config_acqTmp/sync';
+$settings['trusted_host_patterns'] = ['^wcms-docker$',];
+$config_directories['sync'] = 'sites/wcms-docker.fdsu1/files/config_acqTmp/sync';
 if (file_exists(__DIR__ . '/settings.local.php')) {
     include __DIR__ . '/settings.local.php';
 }
\ No newline at end of file
diff --git a/docker-compose.yml b/docker-compose.yml
index a40f78a..c879313 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -2,39 +2,60 @@ version: '3'
 services:
 
   drupal7:
-    container_name: wcms-drupal7
+    container_name: ${PROJECT_NAME}_drupal7
     build: 
         context: ./build-scripts/drupal7
         args:
           PHP_VERSION: ${PHP_VERSION}
           DRUPAL7_VERSION: ${DRUPAL7_VERSION}
+          PROJECT_BASE_URL: ${PROJECT_BASE_URL}
 
     ports:
       - "8080:80"
       - "4443:443"
+      
+
+      
+    stdin_open: true
+    tty: true
+
+  wcms7.1:
+    container_name: ${PROJECT_NAME}_wcms7.1
+    build: 
+        context: ./build-scripts/wcms7.1
+        args:
+          PHP_VERSION_ALT: ${PHP_VERSION_ALT}
+          DRUPAL7_VERSION: ${DRUPAL7_VERSION}
+          PROJECT_BASE_URL: ${PROJECT_BASE_URL}
+
+    ports:
+      - "8081:80"
+      - "4444:443"
+
 
       
     stdin_open: true
     tty: true
     
   drupal8:
-    container_name: wcms-drupal8
+    container_name: ${PROJECT_NAME}_drupal8
     build: 
         context: ./build-scripts/drupal8
         args:
           PHP_VERSION8: ${PHP_VERSION8}
           DRUPAL8_VERSION: ${DRUPAL8_VERSION}
+          PROJECT_BASE_URL: ${PROJECT_BASE_URL}
 
     ports:
-      - "8081:80"
-      - "4444:443"
+      - "8082:80"
+      - "4445:443"
 
       
     stdin_open: true
     tty: true
     
   db:
-    container_name: wcms-mysql
+    container_name: ${PROJECT_NAME}_mysql
     build: ./build-scripts/db
 
     volumes:
@@ -49,7 +70,7 @@ services:
       - "3306:3306"
       
   pma:
-    container_name: wcms-phpmyadmin
+    container_name: ${PROJECT_NAME}_phpmyadmin
     image: phpmyadmin/phpmyadmin
     environment:
       PMA_HOST: db
@@ -61,7 +82,7 @@ services:
      - "8001:80"
      
   portainer:
-    container_name: wcms-portainer
+    container_name: ${PROJECT_NAME}_portainer
     image: portainer/portainer
     command: -H unix:///var/run/docker.sock
     ports:
-- 
GitLab