Skip to content

Commit

Permalink
Merge branch 'release-3.9.1' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
BertrandGouny committed Mar 21, 2019
2 parents f99a675 + dd3f823 commit 8b6957c
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 11 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [3.9.1] - 2019-03-21
### Changed
- Matomo 3.9.1

### Fixed
- Cron log to /proc/self/fd/1 and /proc/self/fd/2

## [3.8.1] - 2019-01-30
### Changed
- Matomo 3.8.1
Expand Down Expand Up @@ -92,6 +99,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## 2.16.2 - 2016-09-24
Initial release

[3.9.1]: https://github.com/osixia/docker-matomo/compare/v3.8.1...v3.9.1
[3.8.1]: https://github.com/osixia/docker-matomo/compare/v3.8.0...v3.8.1
[3.8.0]: https://github.com/osixia/docker-matomo/compare/v3.7.0...v3.8.0
[3.7.0]: https://github.com/osixia/docker-matomo/compare/v3.6.1...v3.7.0
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
NAME = osixia/matomo
VERSION = 3.8.1
VERSION = 3.9.1

.PHONY: build build-nocache test tag-latest push push-latest release git-tag-version

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

[hub]: https://hub.docker.com/r/osixia/matomo/

Latest release: 3.8.1 - Matomo 3.8.1 - [Changelog](CHANGELOG.md) | [Docker Hub](https://hub.docker.com/r/osixia/matomo/) 
Latest release: 3.9.1 - Matomo 3.9.1 - [Changelog](CHANGELOG.md) | [Docker Hub](https://hub.docker.com/r/osixia/matomo/) 

**A docker image to run Matomo (formerly Piwik).**
> [matomo.org](https://matomo.org)
Expand Down
8 changes: 5 additions & 3 deletions image/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM osixia/web-baseimage:1.1.1
FROM osixia/web-baseimage:1.1.2

# Matomo version
ARG MATOMO_VERSION=3.8.1
ARG MATOMO_VERSION=3.9.1

# MariaDB version
ARG MARIADB_MAJOR=10.3
Expand Down Expand Up @@ -42,7 +42,9 @@ RUN apt-get update \
&& tar -xzf matomo.tar.gz --strip 1 -C /var/www/matomo_bootstrap \
&& echo "${MATOMO_VERSION}" > /var/www/matomo_bootstrap/VERSION \
&& curl -fsSL -o /var/www/matomo_bootstrap/misc/GeoLite2-City.tar.gz https://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz \
&& gunzip /var/www/matomo_bootstrap/misc/GeoLite2-City.tar.gz \
&& cd /var/www/matomo_bootstrap/misc \
&& tar -xvf /var/www/matomo_bootstrap/misc/GeoLite2-City.tar.gz --strip-components 1 \
&& cd - \
&& apt-get remove -y --purge --auto-remove curl \
&& rm matomo.tar.gz \
&& apt-get clean \
Expand Down
2 changes: 2 additions & 0 deletions image/environment/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ MATOMO_FORCE_UPDATE: false # if matomo image version is > current version the im
MATOMO_BACKUP_CRON_EXP: 30 4 * * * #every day at 4:30am
MATOMO_BACKUP_TTL: 15 # Delete backups that are over 15 days

MATOMO_ARCHIVE_CRON_EXP: 5 * * * *

# Apache
MATOMO_SERVER_ADMIN: [email protected]
MATOMO_SERVER_BASE_URL: http://matomo.example.org
MATOMO_SERVER_PATH: /matomo

# Self signed certificat will be generated
Expand Down
3 changes: 2 additions & 1 deletion image/service/backup/assets/cronjobs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Backup mail directory
{{ MATOMO_BACKUP_CRON_EXP }} root /sbin/matomo-backup > /proc/1/fd/1 2>/proc/1/fd/2
{{ MATOMO_BACKUP_CRON_EXP }} root /sbin/matomo-backup > /proc/self/fd/1 2>/proc/self/fd/2
{{ MATOMO_ARCHIVE_CRON_EXP }} www-data /usr/bin/php7.0 /var/www/matomo/console core:archive --url={{ MATOMO_SERVER_BASE_URL }}{{ MATOMO_SERVER_PATH }}/ > /proc/self/fd/1 2>/proc/self/fd/2
# empty line
18 changes: 13 additions & 5 deletions image/service/backup/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,19 @@ chmod 600 ${CONTAINER_SERVICE_DIR}/backup/assets/cronjobs
FIRST_START_DONE="${CONTAINER_STATE_DIR}/docker-backup-backup-first-start-done"
# container first start
if [ ! -e "$FIRST_START_DONE" ]; then

# adapt cronjobs file
sed -i "s|{{ MATOMO_BACKUP_CRON_EXP }}|${MATOMO_BACKUP_CRON_EXP}|g" ${CONTAINER_SERVICE_DIR}/backup/assets/cronjobs

touch $FIRST_START_DONE

if [ "$MATOMO_SERVER_PATH" = "/" ]; then
MATOMO_SERVER_PATH=""
fi

# adapt cronjobs file
sed -i "s|{{ MATOMO_BACKUP_CRON_EXP }}|${MATOMO_BACKUP_CRON_EXP}|g" ${CONTAINER_SERVICE_DIR}/backup/assets/cronjobs

sed -i "s|{{ MATOMO_ARCHIVE_CRON_EXP }}|${MATOMO_ARCHIVE_CRON_EXP}|g" ${CONTAINER_SERVICE_DIR}/backup/assets/cronjobs
sed -i "s|{{ MATOMO_SERVER_BASE_URL }}|${MATOMO_SERVER_BASE_URL}|g" ${CONTAINER_SERVICE_DIR}/backup/assets/cronjobs
sed -i "s|{{ MATOMO_SERVER_PATH }}|${MATOMO_SERVER_PATH}|g" ${CONTAINER_SERVICE_DIR}/backup/assets/cronjobs

touch $FIRST_START_DONE
fi

exit 0
1 change: 1 addition & 0 deletions test/test.bats
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ load test_helper

run_image
wait_process apache2 php-fpm7.0
sleep 1
curl --silent --insecure https://$CONTAINER_IP >> $tmp_file
run grep -c "installation-progress" $tmp_file
rm $tmp_file
Expand Down

0 comments on commit 8b6957c

Please sign in to comment.