No description
Find a file
2024-12-12 14:39:11 -08:00
.env Update passwords 2024-12-11 20:29:05 -06:00
DASH_PLAN.md Add dashboard plan document 2024-12-12 14:39:11 -08:00
DeafGain_Tech_Stack Initial commit: Add technology stack 2024-12-11 20:25:00 -06:00
docker-compose.yml Add build pull_policy 2024-12-11 22:38:01 -06:00
README.md Initial commit: Add technology stack 2024-12-11 20:25:00 -06:00
Statistics-plan.html Initial commit: Add technology stack 2024-12-11 20:25:00 -06:00
TECH_PLAN Initial commit: Add technology stack 2024-12-11 20:25:00 -06:00

Matomo Analytics Setup

This repository contains the Docker configuration for running Matomo Analytics in production.

Prerequisites

  • Docker
  • Docker Compose
  • At least 2GB of RAM
  • 20GB+ storage space

Setup Instructions

  1. Configure environment variables:

    • Edit .env file and set secure passwords for:
      • MYSQL_ROOT_PASSWORD
      • MYSQL_PASSWORD
  2. Start the containers:

    docker compose up -d
    
  3. Access Matomo:

    • Open http://localhost:8080
    • Follow the installation wizard
    • Use these database settings:
      • Server: db
      • Login: matomo
      • Password: (value of MYSQL_PASSWORD from .env)
      • Database Name: matomo

Production Configuration

Security

  • Change default admin password
  • Enable 2FA for admin accounts
  • Configure trusted hosts in config.ini.php
  • Set up SSL/TLS termination via reverse proxy

Performance

  • Database is configured with:
    • max-allowed-packet: 64MB
    • PHP memory limit: 512MB
  • Adjust these values in docker-compose.yml if needed

Maintenance

  • Backup volumes regularly:
    • matomo_db: Database data
    • matomo_data: Matomo files
    • matomo_config: Configuration
  • Monitor container health:
    docker compose ps
    docker compose logs
    

Updating

  1. Pull new images:
    docker compose pull
    
  2. Restart containers:
    docker compose down
    docker compose up -d
    

Troubleshooting

Database Connection Issues

  • Verify database credentials in .env
  • Check database container logs:
    docker compose logs db
    

Performance Issues

  • Monitor resource usage:
    docker stats
    
  • Adjust PHP memory limit if needed
  • Consider enabling caching

Container Health

Both containers have health checks configured:

  • Database: Checks MySQL connection
  • Matomo: Checks HTTP response Monitor health status:
docker compose ps