No description
| .env | ||
| DASH_PLAN.md | ||
| DeafGain_Tech_Stack | ||
| docker-compose.yml | ||
| README.md | ||
| Statistics-plan.html | ||
| TECH_PLAN | ||
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
-
Configure environment variables:
- Edit
.envfile and set secure passwords for:- MYSQL_ROOT_PASSWORD
- MYSQL_PASSWORD
- Edit
-
Start the containers:
docker compose up -d -
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
- Pull new images:
docker compose pull - 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