Giter Site home page Giter Site logo

docker-matomo's Introduction

tiredofit/matomo

About

Dockerfile to build a matomo container image. It is an Open Source Google Analytics Replacement.

It will automatically download the latest Piwik release upon build, and if you have set correct environment variables, will autocreate a database if you wish.

Changelog

Maintainer

Table of Contents

Prerequisites and Assumptions

This image relies on an external MySQL Server, external SMTP Server, external Redis Server and is meant to be run behind a reverse SSL Proxy such as nginx-proxy.

Installation

Automated builds of the image are available on Registry

docker pull docker.io/tiredofit/matomo

Quick Start

Configuration

Persistent Storage

The following directories are used for configuration and can be mapped for persistent storage.

Directory Description
/www/matomo Root matomo Directory
/var/log/unit Nginx Unit logfiles

Database

This container requires the usage of an external database. Set one up accordingly.

CREATE USER 'matomo'@'%.%.%.%' IDENTIFIED BY 'password';
CREATE DATABASE IF NOT EXISTS `matomo` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;
GRANT ALL PRIVILEGES ON `matomo`.* TO 'matomo'@'%.%.%.%';

Environment Variables

Below is the complete list of available options that can be used to customize your installation.

Parameter Description Default _FILE
DB_HOST MySQL external container hostname (e.g. matomo1-db) x
DB_NAME MySQL database name i.e. (e.g. matomo) x
DB_USER MySQL username for database (e.g. matomo) x
DB_PASS MySQL password for database (e.g. userpassword) x

Networking

The following ports are exposed.

Port Description
80 HTTP

Maintenance

Shell Access

For debugging and maintenance purposes you may want access the containers shell.

docker exec -it (whatever your container name is e.g. matomo) bash

References

docker-matomo's People

Contributors

tiredofit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

docker-matomo's Issues

502 Bad gateway and no folder www/matomo

Hello,
i am using https://github.com/tiredofit/docker-nginx-php-fpm for some project with success. I try this one but it fails. I use a simple docker-compose.yml file

version: '3'

services:
  matomo-app:
    image: tiredofit/matomo
    container_name: matomo-app
    userns_mode: 'host'
    volumes:
      #- ./data:/www/matomo
      #- ./logs:/www/logs
      - /etc/localtime:/etc/localtime:ro
    environment:
      - VIRTUAL_HOST=stats.mydomain.com
      - VIRTUAL_NETWORK=webproxy
      - VIRTUAL_PORT=80
      - LETSENCRYPT_HOST=stats.mydomain.com
      - [email protected]

      #- ZABBIX_HOSTNAME=matomo-app

      - DB_HOST=mariadb
      - DB_NAME=dbForMatomo
      - DB_USER=usernameForMatomo
      - DB_PASS=passwordForMatomo 
  
      - CRON_PERIOD=60
    networks:
      - default
    restart: always

networks:
  default:
    external:
      name: webproxy

No redis. I use my already mariadb instance. What i get:

  • A 502 Bad Gateway. I cannot explain why. All other containers (docker-nginx-php-fpm) at 80/TCP are working great.
  • When i docker exec -it matomo-app bash the www folder has only a folder log. There is not matomo folder. Is it normal ?

UPDATE:
I think there is no installation command for matomo in Dockerfile.
I also noticed that there is a wrong line echo 'geoip.custom_directory=/www/piwik/misc' >> /etc/php7/php.ini && \. It's /www/matomo/misc, right ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.