diff --git a/matomo/README.org b/matomo/README.org new file mode 100644 index 0000000..3095ce8 --- /dev/null +++ b/matomo/README.org @@ -0,0 +1,9 @@ +# -*- ispell-local-dictionary: "english" -*- + +* Info + +From: https://github.com/matomo-org/docker + +* Usage + +Config info : https://hub.docker.com/_/matomo \ No newline at end of file diff --git a/matomo/hooks/mysql_database-relation-joined b/matomo/hooks/mysql_database-relation-joined new file mode 100755 index 0000000..885413c --- /dev/null +++ b/matomo/hooks/mysql_database-relation-joined @@ -0,0 +1,21 @@ +#!/bin/bash + +set -e + +PASSWORD="$(relation-get password)" +USER="$(relation-get user)" +DBNAME="$(relation-get dbname)" + + +config-add "\ +services: + $MASTER_BASE_SERVICE_NAME: + environment: + MYSQL_USER: \"$USER\" + MYSQL_PASSWORD: \"$PASSWORD\" + MYSQL_DATABASE: \"$DBNAME\" + MATOMO_DATABASE_HOST: \"$TARGET_SERVICE_NAME\" +" + + +info "Configured $SERVICE_NAME code for $TARGET_SERVICE_NAME access." diff --git a/matomo/hooks/web_proxy-relation-joined b/matomo/hooks/web_proxy-relation-joined new file mode 100755 index 0000000..5a8e89a --- /dev/null +++ b/matomo/hooks/web_proxy-relation-joined @@ -0,0 +1,13 @@ +#!/bin/bash + +set -e + +DOMAIN=$(relation-get domain) || exit 1 + +# config-add "\ +# services: +# $MASTER_BASE_SERVICE_NAME: +# environment: + + +# " \ No newline at end of file diff --git a/matomo/metadata.yml b/matomo/metadata.yml new file mode 100644 index 0000000..1ff43e1 --- /dev/null +++ b/matomo/metadata.yml @@ -0,0 +1,30 @@ +docker-image: docker.0k.io/matomo:4.15.1-apache +data-resources: + - /var/www/html/ + +uses: + mysql-database: + #constraint: required | recommended | optional + #auto: pair | summon | none ## default: pair + constraint: required + auto: summon + solves: + database: "main storage" + web-proxy: + constraint: required + auto: summon + solves: + proxy: "Public access" + default-options: + target: !var-expand ${MASTER_BASE_SERVICE_NAME}:80 + log-rotate: + constraint: recommended + auto: pair + solves: + disk-leak: "/matomo/logs" + backup: + constraint: recommended + auto: pair + solves: + backup: "Automatic regular backup" + default-options: