From eb233ab8a7a66fcb4a1de0ad453d210b3bca6d52 Mon Sep 17 00:00:00 2001 From: Nigel Banks Date: Thu, 15 Apr 2021 13:47:41 +0100 Subject: [PATCH] No longer use volume for Matomo install Having the code base in a volume makes upgrades and migrations a pain, additionaly the file copies on initial startup can be really slow on NFS drives. Having a volume allows for the dynamic installation of plugins, but then that is specific to that instance, if you were to run a several stage environment dev/stage/prod then one would need to manually check that the plugins exist is each environment. Better would be to extend the image and pack the plugins in with the installation. @see https://github.com/matomo-org/docker/issues/57 @see https://github.com/matomo-org/docker/issues/161 --- matomo/Dockerfile | 2 +- matomo/rootfs/etc/cont-init.d/00-matomo-deploy.sh | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) delete mode 100755 matomo/rootfs/etc/cont-init.d/00-matomo-deploy.sh diff --git a/matomo/Dockerfile b/matomo/Dockerfile index df26fbab..19637d81 100644 --- a/matomo/Dockerfile +++ b/matomo/Dockerfile @@ -36,7 +36,7 @@ ENV \ MATOMO_USER_NAME=admin \ MATOMO_USER_PASS='$2y$10$S38e7HPM9LI3aOIvcnRsfuMCm4ipNP572QsvbCK60upoHVJ61hMrS' -COPY --from=download --chown=nginx:nginx /opt/matomo /opt/matomo +COPY --from=download --chown=nginx:nginx /opt/matomo /var/www/matomo COPY rootfs / diff --git a/matomo/rootfs/etc/cont-init.d/00-matomo-deploy.sh b/matomo/rootfs/etc/cont-init.d/00-matomo-deploy.sh deleted file mode 100755 index 764b6ac0..00000000 --- a/matomo/rootfs/etc/cont-init.d/00-matomo-deploy.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/with-contenv bash -set -e - -# Runs before templates are rendered (before 01-confd-render-templates.sh). -# Copies matomo into the expected location it will run from (/var/www/matomo), -# if not already present. This is to allow users to use non-volume mounts like -# bind (https://docs.docker.com/storage/volumes/) for the entire matomo install. -if [[ ! -d /var/www/matomo/config ]]; then - cp -r /opt/matomo /var/www - chown nginx:nginx -R /var/www/matomo -fi