diff --git a/blueprints/matomo/docker-compose.yml b/blueprints/matomo/docker-compose.yml new file mode 100644 index 00000000..c66b107d --- /dev/null +++ b/blueprints/matomo/docker-compose.yml @@ -0,0 +1,43 @@ +services: + matomo: + image: matomo:latest + restart: always + environment: + - MATOMO_DATABASE_HOST=db + - MATOMO_DATABASE_ADAPTER=mysql + - MATOMO_DATABASE_TABLES_PREFIX=matomo_ + - MATOMO_DATABASE_USERNAME=${DATABASE_USERNAME} + - MATOMO_DATABASE_PASSWORD=${DATABASE_PASSWORD} + - MATOMO_DATABASE_DBNAME=${DATABASE_NAME} + volumes: + - matomo_data:/var/www/html + depends_on: + db: + condition: service_healthy + labels: + - "traefik.enable=true" + - "traefik.http.routers.${DOKPLOY_SERVICE_ID}.rule=Host(`${DOMAINS}`)" + - "traefik.http.routers.${DOKPLOY_SERVICE_ID}.entrypoints=websecure" + - "traefik.http.routers.${DOKPLOY_SERVICE_ID}.tls=true" + - "traefik.http.routers.${DOKPLOY_SERVICE_ID}.tls.certresolver=letsencrypt" + - "traefik.http.services.${DOKPLOY_SERVICE_ID}.loadbalancer.server.port=80" + + db: + image: mariadb:10 + command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci + restart: always + environment: + - MYSQL_ROOT_PASSWORD=${DATABASE_ROOT_PASSWORD} + - MYSQL_DATABASE=${DATABASE_NAME} + - MYSQL_USER=${DATABASE_USERNAME} + - MYSQL_PASSWORD=${DATABASE_PASSWORD} + volumes: + - db_data:/var/lib/mysql + healthcheck: + test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p${DATABASE_ROOT_PASSWORD}"] + timeout: 5s + retries: 5 + +volumes: + matomo_data: + db_data: diff --git a/blueprints/matomo/matomo.png b/blueprints/matomo/matomo.png new file mode 100644 index 00000000..507c6b33 Binary files /dev/null and b/blueprints/matomo/matomo.png differ diff --git a/blueprints/matomo/template.toml b/blueprints/matomo/template.toml new file mode 100644 index 00000000..b4d2adb3 --- /dev/null +++ b/blueprints/matomo/template.toml @@ -0,0 +1,29 @@ +name = "Matomo" +id = "matomo" +description = "Leading open-source web analytics platform" + +[[variables]] +name = "DOMAINS" +label = "Matomo Domain" +defaultValue = "" +placeholder = "analytics.example.com" + +[[variables]] +name = "DATABASE_ROOT_PASSWORD" +label = "MariaDB Root Password" +defaultValue = "change-me-root" + +[[variables]] +name = "DATABASE_NAME" +label = "Database Name" +defaultValue = "matomo" + +[[variables]] +name = "DATABASE_USERNAME" +label = "Database User" +defaultValue = "matomo" + +[[variables]] +name = "DATABASE_PASSWORD" +label = "Database Password" +defaultValue = "change-me-user" diff --git a/meta.json b/meta.json index 3ae0cb5e..f27222b3 100644 --- a/meta.json +++ b/meta.json @@ -6779,5 +6779,23 @@ "saml", "multi-tenant" ] + }, + { + "id": "matomo", + "name": "Matomo", + "version": "latest", + "description": "Leading open-source web analytics platform with global data ownership.", + "logo": "matomo.png", + "links": { + "github": "https://github.com/matomo-software/matomo", + "website": "https://matomo.org", + "docs": "https://matomo.org/docs" + }, + "tags": [ + "analytics", + "privacy", + "self-hosted", + "metrics" + ] } ]