Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
*.zip
./build/tawk-zencart-*/
docker/bin
4 changes: 4 additions & 0 deletions docker/bin/Dockerfile → docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ RUN unzip -q ${ZENCART_FN}.zip \
RUN echo [Date] > /usr/local/etc/php/conf.d/timezone.ini \
&& echo date.timezone = ${TIMEZONE} >> /usr/local/etc/php/conf.d/timezone.ini

COPY --chown=www-data:www-data ./bin/tawkto/YOUR_ADMIN_FOLDER /var/www/html/admin_zc
COPY --chown=www-data:www-data ./bin/tawkto/includes/templates/YOUR_TEMPLATE /var/www/html/includes/templates/responsive_classic/
COPY --chown=www-data:www-data ./bin/tawkto/includes/extra_datafiles /var/www/html/includes/extra_datafiles

WORKDIR /var/www/html

CMD ["apache2-foreground"]
4 changes: 4 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ Docker container for ZenCart.

## Usage

Build the image:

- ```./build.sh```

Start the container:

- ```docker-compose up```
Expand Down
22 changes: 22 additions & 0 deletions docker/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/sh
set -e;

build_dir=$(dirname $0);
module_dir=$build_dir/bin/tawkto;

if [ -d "$module_dir" ]; then
echo "Removing existing module folder";
rm -r $module_dir;
fi

echo "Creating module folder";
mkdir -p $module_dir;

echo "Copying files to module folder";
cp -r $build_dir/../includes $module_dir
cp -r $build_dir/../YOUR_ADMIN_FOLDER $module_dir

echo "Done building module folder";

echo "Building docker image"
docker-compose build
2 changes: 1 addition & 1 deletion docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3'
services:
web:
build:
context: ./bin
context: .
args:
TIMEZONE: UTC
ports:
Expand Down