来源
咕咕鸽:https://blog.laoda.de/archives/docker-compose-install-matomo
部署
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| version: "3"
services: matomo_db: image: mariadb command: --max-allowed-packet=64MB restart: always volumes: - ./db:/var/lib/mysql environment: - MYSQL_ROOT_PASSWORD=Pas3W0rd env_file: - ./db.env
matomo_app: image: matomo restart: always volumes:
- ./html:/var/www/html environment: - MATOMO_DATABASE_HOST=matomo_db env_file: - ./db.env ports: - 18080:80 - 18443:443
|
- mkdir matomo && cd matomo
- nano docker-compose.yml
- nano db.env
- docker-compose up -d
- 反代18080端口
- 将统计代码添加到主题设置里
1 2 3 4 5 6 7 8
| MYSQL_PASSWORD=Pas3W0rd MYSQL_DATABASE=matomo MYSQL_USER=matomo MATOMO_DATABASE_ADAPTER=mysql MATOMO_DATABASE_TABLES_PREFIX=matomo_ MATOMO_DATABASE_USERNAME=matomo MATOMO_DATABASE_PASSWORD=Pas3W0rd MATOMO_DATABASE_DBNAME=matomo
|