Skip to content

Commit 5e6e386

Browse files
committed
Add matomo dev config
1 parent e783bdc commit 5e6e386

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

config/autoload/matomo.local.php.dist

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
/*
6+
* Dev matomo instance needs to be manually configured once before enabling the configuration below.
7+
*
8+
* 1. Go to http://localhost:8003 and follow the installation instructions.
9+
* 2. Open data/infra/matomo/config/config.ini.php and replace `trusted_hosts[] = "localhost"` with
10+
* `trusted_hosts[] = "localhost:8003"` (see https://github.com/matomo-org/matomo/issues/9549)
11+
* 3. Go to http://localhost:8003/index.php?module=SitesManager&action=index and paste the ID for the site you just
12+
* created into the `site_id` field below.
13+
* 4. Go to http://localhost:8003/index.php?module=UsersManager&action=userSecurity, scroll down, click
14+
* "Create new token" and once generated, paste the token into the `api_token` field below.
15+
*/
16+
17+
return [
18+
19+
'matomo' => [
20+
// 'enabled' => true,
21+
// 'base_url' => 'http://shlink_matomo',
22+
// 'site_id' => '...',
23+
// 'api_token' => '...',
24+
],
25+
26+
];

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ services:
211211
ports:
212212
- "8003:80"
213213
volumes:
214-
# Matomo does not persist port in trusted hosts. This is needed to edit config afterward
214+
# Matomo does not persist port in trusted hosts. This volume is needed to edit config afterward
215215
# https://github.com/matomo-org/matomo/issues/9549
216216
- ./data/infra/matomo:/var/www/html
217217
links:

0 commit comments

Comments
 (0)