Skip to content

Commit

Permalink
Matomo upgrade 4151 (#284)
Browse files Browse the repository at this point in the history
* Matomo upgrade to version 4.14.2 and added geolocation database

* Updated paths

* Gunzip added to base image for download.sh

* Removing the strip functions for gunzip

* Working matomo image

* Use download.sh for geoip database.

* Revamped geoip download no hardcode values

* Upgraded matomo and extra tools

* Upgraded matomo and extra tools

* Wrong SHA. Fixed

* Extratools needs parity with matomo version, use 4.x with 4.x

* Removed citylite db download in Dockerfile

---------

Co-authored-by: Nigel Banks <[email protected]>
  • Loading branch information
Gavin Morris and nigelgbanks authored Oct 30, 2023
1 parent c78628f commit d619760
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
1 change: 1 addition & 0 deletions base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ RUN --mount=type=cache,id=base-apk-${TARGETARCH},sharing=locked,target=/var/cach
curl \
git \
gnupg \
gzip \
jq \
mariadb-client \
mysql-client \
Expand Down
7 changes: 6 additions & 1 deletion base/rootfs/usr/local/bin/download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function usage {
-u --url The url of the file to download.
-c --sha256 The sha256 checksum to use to validate the download.
-d --dest The location to unpack file into (optional).
-s --strip Exclude the root folder when unpacking (optional).
-s --strip Exclude the root folder when unpacking (optional, not supported with gzip or jar).
-h --help Show this help.
-x --debug Debug this script.
Expand Down Expand Up @@ -107,17 +107,22 @@ function unpack {
local file="${1}"
local dest="${2}"
local args=()
local filename=
mkdir -p "${dest}"
if [[ -v STRIP ]]; then
args+=("--strip-components" "1")
fi
filename=$(basename "${file}")
case "${file}" in
*.tar.xz | *.txz)
tar -xf "${file}" -C "${dest}" "${args[@]}"
;;
*.tar.gz | *.tgz)
tar -xzf "${file}" -C "${dest}" "${args[@]}"
;;
*.gz | *.gzip)
gunzip "${file}" -f -c > "${dest}/${filename%.*}"
;;
*.zip | *.war)
if [[ -v STRIP ]]; then
mkdir -p /tmp/unpack
Expand Down
10 changes: 5 additions & 5 deletions matomo/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ FROM nginx

ARG TARGETARCH

ARG MATOMO_VERSION=4.13.0
ARG MATOMO_VERSION=4.15.1
ARG MATOMO_FILE=${MATOMO_VERSION}.tar.gz
ARG MATOMO_URL=https://builds.matomo.org/matomo-${MATOMO_FILE}
ARG MATOMO_SHA256=59614fbfa870d354f8abc634cc21dbbebda2b9fde31592df8c813c39e1dff981
ARG MATOMO_SHA256=5e77e2a6b18ba8542a3e4df481c0152dd059de960c49d04f7e789c9bb5753d27

ARG EXTRA_TOOLS_VERSION=4.0.1-beta4
ARG EXTRA_TOOLS_VERSION=4.1.0-beta5
ARG EXTRA_TOOLS_FILE=${EXTRA_TOOLS_VERSION}.tar.gz
ARG EXTRA_TOOLS_URL=https://github.com/digitalist-se/extratools/archive/refs/tags/${EXTRA_TOOLS_FILE}
ARG EXTRA_TOOLS_SHA256=1d04ee7b871c76c9f875da100e20e9472059b2a4fe7c52830360e90f205779e2
ARG EXTRA_TOOLS_SHA256=ce9c9f1d01aaf04e3dfded21d6b9080c1fda633535295dc1c8cd0427bcdc826f

EXPOSE 8000

Expand All @@ -30,7 +30,7 @@ RUN --mount=type=cache,id=matomo-downloads-${TARGETARCH},sharing=locked,target=/
wget --directory-prefix=/var/www/matomo "https://raw.githubusercontent.com/matomo-org/matomo/${MATOMO_VERSION}/composer.json" && \
wget --directory-prefix=/var/www/matomo "https://raw.githubusercontent.com/matomo-org/matomo/${MATOMO_VERSION}/composer.lock" && \
composer require -d /var/www/matomo symfony/yaml:~2.6.0 && \
composer require -d /var/www/matomo symfony/process:^3.4 && \
composer require -d /var/www/matomo symfony/process:^5.4 && \
composer install -d /var/www/matomo && \
download.sh \
--url "${EXTRA_TOOLS_URL}" \
Expand Down
2 changes: 1 addition & 1 deletion matomo/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Matomo

Docker image for [Matomo] version 4.13.0.
Docker image for [Matomo] version 4.15.1

Please refer to the [Matomo Documentation] for more in-depth information.

Expand Down

0 comments on commit d619760

Please sign in to comment.