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 && \ ...@@ -39,7 +39,6 @@ RUN apt-get update && \
apt-get install --assume-yes \ apt-get install --assume-yes \
apache2 \ apache2 \
nano \ nano \
yarn \
openssh-server \ openssh-server \
wget \ wget \
sudo \ sudo \
...@@ -68,7 +67,6 @@ RUN apt-get update && \ ...@@ -68,7 +67,6 @@ RUN apt-get update && \
git \ git \
nodejs \ nodejs \
yarn \ yarn \
drush \
ruby-sass \ ruby-sass \
ruby-compass \ ruby-compass \
mysql-client mysql-client
...@@ -104,6 +102,9 @@ RUN sudo npm install npm@latest -g \ ...@@ -104,6 +102,9 @@ RUN sudo npm install npm@latest -g \
# Install Composer # Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=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. # Forward logs to docker log collector.
RUN ln -sf /dev/stdout /var/log/apache2/access.log && \ RUN ln -sf /dev/stdout /var/log/apache2/access.log && \
ln -sf /dev/stderr /var/log/apache2/error.log && \ ln -sf /dev/stderr /var/log/apache2/error.log && \
...@@ -118,8 +119,21 @@ RUN chmod +x /usr/local/bin/docker-entrypoint.sh ...@@ -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 git clone https://git.uwaterloo.ca/wcms/uw_wcms_pattern_lab.git /var/www/html/uw_wcms_pattern_lab
RUN echo "Cloned patternlab..." 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 # 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...." RUN echo "Cloned Drupal 8...."
# Clone our WCMS profile # Clone our WCMS profile
...@@ -127,13 +141,14 @@ RUN cd /var/www/drupal8/profiles && \ ...@@ -127,13 +141,14 @@ RUN cd /var/www/drupal8/profiles && \
git clone https://git.uwaterloo.ca/wcms/uw_base_profile.git && \ git clone https://git.uwaterloo.ca/wcms/uw_base_profile.git && \
cd /var/www/drupal8/profiles/uw_base_profile && \ cd /var/www/drupal8/profiles/uw_base_profile && \
git checkout 8.x-3.x git checkout 8.x-3.x
# Manually set up the apache environment variables # Create the settings.php file
ENV APACHE_RUN_USER www-data RUN cd /var/www/drupal8/sites/default && \
ENV APACHE_RUN_GROUP www-data cp default.settings.php settings.php
ENV APACHE_LOG_DIR /var/log/apache2
ENV APACHE_LOCK_DIR /var/lock/apache2 # Add Drupal permissions to the drupal folder
ENV APACHE_PID_FILE /var/run/apache2.pid RUN chown -R vagrant:www-data /var/www/drupal8
RUN chmod -R g+w /var/www/drupal8
# Expose the default Apache port. # Expose the default Apache port.
EXPOSE 80 EXPOSE 80
......
version: '3' version: '3'
services: services:
web: web:
container_name: wcms-web
build: ./build-scripts/web build: ./build-scripts/web
ports: ports:
...@@ -11,7 +12,8 @@ services: ...@@ -11,7 +12,8 @@ services:
tty: true tty: true
db: db:
image: lullaboteducation/drupaldevwithdocker-mysql container_name: wcms-mysql
image: wodby/mariadb
volumes: volumes:
- ./db-backups:/var/mysql/backups:delegated - ./db-backups:/var/mysql/backups:delegated
environment: environment:
...@@ -21,7 +23,9 @@ services: ...@@ -21,7 +23,9 @@ services:
MYSQL_PASSWORD: verybadpassword MYSQL_PASSWORD: verybadpassword
ports: ports:
- "3306:3306" - "3306:3306"
pma: pma:
container_name: wcms-phpmyadmin
image: phpmyadmin/phpmyadmin image: phpmyadmin/phpmyadmin
environment: environment:
PMA_HOST: db PMA_HOST: db
...@@ -31,3 +35,16 @@ services: ...@@ -31,3 +35,16 @@ services:
PHP_MAX_INPUT_VARS: 1G PHP_MAX_INPUT_VARS: 1G
ports: ports:
- "8001:80" - "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