Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
wcms-docker
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Chris Shantz
wcms-docker
Commits
554c2da6
Commit
554c2da6
authored
6 years ago
by
Chris Shantz
Browse files
Options
Downloads
Patches
Plain Diff
Cleaning up we dockerfile and making changes to docker-compose.
parent
6cc73c8e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
build-scripts/web/Dockerfile
+25
-10
25 additions, 10 deletions
build-scripts/web/Dockerfile
docker-compose.yml
+18
-1
18 additions, 1 deletion
docker-compose.yml
with
43 additions
and
11 deletions
build-scripts/web/Dockerfile
+
25
−
10
View file @
554c2da6
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
docker-compose.yml
+
18
−
1
View file @
554c2da6
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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment