Add matomo dev config

This commit is contained in:
Alejandro Celaya 2023-11-22 18:30:03 +01:00
parent e783bdc456
commit 5e6e386c5a
2 changed files with 27 additions and 1 deletions

View file

@ -0,0 +1,26 @@
<?php
declare(strict_types=1);
/*
* Dev matomo instance needs to be manually configured once before enabling the configuration below.
*
* 1. Go to http://localhost:8003 and follow the installation instructions.
* 2. Open data/infra/matomo/config/config.ini.php and replace `trusted_hosts[] = "localhost"` with
* `trusted_hosts[] = "localhost:8003"` (see https://github.com/matomo-org/matomo/issues/9549)
* 3. Go to http://localhost:8003/index.php?module=SitesManager&action=index and paste the ID for the site you just
* created into the `site_id` field below.
* 4. Go to http://localhost:8003/index.php?module=UsersManager&action=userSecurity, scroll down, click
* "Create new token" and once generated, paste the token into the `api_token` field below.
*/
return [
'matomo' => [
// 'enabled' => true,
// 'base_url' => 'http://shlink_matomo',
// 'site_id' => '...',
// 'api_token' => '...',
],
];

View file

@ -211,7 +211,7 @@ services:
ports:
- "8003:80"
volumes:
# Matomo does not persist port in trusted hosts. This is needed to edit config afterward
# Matomo does not persist port in trusted hosts. This volume is needed to edit config afterward
# https://github.com/matomo-org/matomo/issues/9549
- ./data/infra/matomo:/var/www/html
links: