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

Cleaning up we dockerfile and making changes to docker-compose.

parent 6cc73c8e
No related branches found
No related tags found
No related merge requests found
......@@ -39,7 +39,6 @@ RUN apt-get update && \
apt-get install --assume-yes \
apache2 \
nano \
yarn \
openssh-server \
wget \
sudo \
......@@ -68,7 +67,6 @@ RUN apt-get update && \
git \
nodejs \
yarn \
drush \
ruby-sass \
ruby-compass \
mysql-client
......@@ -104,6 +102,9 @@ RUN sudo npm install npm@latest -g \
# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Add the "vagrant" user (because we are all familiar with having it)
RUN useradd -d /home/vagrant -ms /bin/bash -g root -G sudo -p vagrant vagrant
# Forward logs to docker log collector.
RUN ln -sf /dev/stdout /var/log/apache2/access.log && \
ln -sf /dev/stderr /var/log/apache2/error.log && \
......@@ -118,8 +119,21 @@ RUN chmod +x /usr/local/bin/docker-entrypoint.sh
RUN git clone https://git.uwaterloo.ca/wcms/uw_wcms_pattern_lab.git /var/www/html/uw_wcms_pattern_lab
RUN echo "Cloned patternlab..."
# Add drush 8
RUN wget https://github.com/drush-ops/drush/releases/download/8.1.17/drush.phar && \
chmod +x drush.phar && \
mv drush.phar /usr/local/bin/drush
# Manually set up the apache environment variables
ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOG_DIR /var/log/apache2
ENV APACHE_LOCK_DIR /var/lock/apache2
ENV APACHE_PID_FILE /var/run/apache2.pid
# Clone Drupal
RUN drush dl -v -d drupal-8.5.5 --destination="/var/www" --drupal-project-rename="drupal8"
RUN drush dl -v -d drupal-8.5.6 --destination="/var/www" --drupal-project-rename="drupal8"
RUN echo "Cloned Drupal 8...."
# Clone our WCMS profile
......@@ -127,13 +141,14 @@ RUN cd /var/www/drupal8/profiles && \
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
# Manually set up the apache environment variables
ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOG_DIR /var/log/apache2
ENV APACHE_LOCK_DIR /var/lock/apache2
ENV APACHE_PID_FILE /var/run/apache2.pid
# Create the settings.php file
RUN cd /var/www/drupal8/sites/default && \
cp default.settings.php settings.php
# Add Drupal permissions to the drupal folder
RUN chown -R vagrant:www-data /var/www/drupal8
RUN chmod -R g+w /var/www/drupal8
# Expose the default Apache port.
EXPOSE 80
......
version: '3'
services:
web:
container_name: wcms-web
build: ./build-scripts/web
ports:
......@@ -11,7 +12,8 @@ services:
tty: true
db:
image: lullaboteducation/drupaldevwithdocker-mysql
container_name: wcms-mysql
image: wodby/mariadb
volumes:
- ./db-backups:/var/mysql/backups:delegated
environment:
......@@ -21,7 +23,9 @@ services:
MYSQL_PASSWORD: verybadpassword
ports:
- "3306:3306"
pma:
container_name: wcms-phpmyadmin
image: phpmyadmin/phpmyadmin
environment:
PMA_HOST: db
......@@ -31,3 +35,16 @@ services:
PHP_MAX_INPUT_VARS: 1G
ports:
- "8001:80"
portainer:
container_name: wcms-portainer
image: portainer/portainer
command: -H unix:///var/run/docker.sock
ports:
- "9000:9000"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- portainer_data:/data
volumes:
portainer_data:
\ No newline at end of file
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