Skip to content

Commit

Permalink
restructured docker folder; added docker file and build script to aut…
Browse files Browse the repository at this point in the history
…o-install plugin on docker image build
  • Loading branch information
alvinjohnsonso committed Sep 24, 2021
1 parent 823e21c commit 6e5d8f0
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
upload/
*.zip
docker/bin
17 changes: 17 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM bitnami/opencart:3.0.3-6-debian-10-r64

ENV OPENCART_ROOT_DIR=/opt/bitnami/opencart

# Copy setup script
ADD ./assets/setup.sh /tmp/setup.sh

# RUN setup
RUN chmod +x /tmp/setup.sh
RUN /tmp/setup.sh

# Copy plugin files
COPY ./bin/tawkto/admin/controller/extension /opt/bitnami/opencart/admin/controller/extension
COPY ./bin/tawkto/admin/language/en-gb/extension /opt/bitnami/opencart/admin/language/en-gb/extension
COPY ./bin/tawkto/admin/view /opt/bitnami/opencart/admin/view
COPY --chown=daemon:daemon ./bin/tawkto/catalog/controller/extension /opt/bitnami/opencart/catalog/controller/extension
COPY --chown=daemon:daemon ./bin/tawkto/catalog/view/theme/default /opt/bitnami/opencart/catalog/view/theme/default
File renamed without changes.
File renamed without changes.
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/../admin $module_dir
cp -r $build_dir/../catalog $module_dir

echo "Done building module folder";

echo "Building docker image"
docker-compose build
10 changes: 0 additions & 10 deletions docker/build/Dockerfile

This file was deleted.

4 changes: 2 additions & 2 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
web:
depends_on:
- db
build: ./build
build: .
ports:
- 8000:8000
- 8443:8443
Expand All @@ -30,7 +30,7 @@ services:
- APACHE_HTTPS_PORT_NUMBER=8443
volumes:
- web_data:/bitnami
- ./aliases:/opt/bitnami/apache/conf/aliases
- ./assets/multistore.conf:/opt/bitnami/apache/conf/aliases/multistore.conf

volumes:
db_data:
Expand Down

0 comments on commit 6e5d8f0

Please sign in to comment.