File tree Expand file tree Collapse file tree 4 files changed +36
-2
lines changed
Expand file tree Collapse file tree 4 files changed +36
-2
lines changed Original file line number Diff line number Diff line change 1+ docker /bin
Original file line number Diff line number Diff line change 1+ ARG DRUPAL_IMAGE_VERSION
2+
3+ FROM drupal:${DRUPAL_IMAGE_VERSION}
4+
5+ COPY --chown=www-data:www-data ./bin/tawkto /opt/drupal/web/modules/tawkto
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ set -e;
3+
4+ build_dir=$( dirname $0 ) ;
5+ module_dir=$build_dir /bin/tawkto;
6+
7+ if [ -d " $module_dir " ]; then
8+ echo " Removing existing module folder" ;
9+ rm -r $module_dir ;
10+ fi
11+
12+ echo " Creating module folder" ;
13+ mkdir -p $module_dir ;
14+
15+ echo " Copying files to module folder" ;
16+ cp -r $build_dir /../tawk_to/* $module_dir
17+
18+ echo " Done building module folder" ;
19+
20+ echo " Building docker image"
21+ if [ -z $1 ]; then
22+ docker-compose build;
23+ else
24+ docker-compose --env-file $1 build;
25+ fi
Original file line number Diff line number Diff line change @@ -12,13 +12,16 @@ services:
1212 MYSQL_PASSWORD : drupal
1313
1414 drupal :
15+ build :
16+ context : .
17+ args :
18+ DRUPAL_IMAGE_VERSION : ${DRUPAL_IMAGE_VERSION}
1519 depends_on :
1620 - db
17- image : drupal:${DRUPAL_IMAGE_VERSION}
1821 ports :
1922 - 8000:80
2023 volumes :
21- - web_data:/var/www/html
24+ - web_data:/opt/drupal
2225volumes :
2326 db_data :
2427 web_data :
You can’t perform that action at this time.
0 commit comments