docker icon indicating copy to clipboard operation
docker copied to clipboard

Matomo config file

Open pixar634 opened this issue 3 years ago • 1 comments

How do I access the matomo config file to remove the warning it shows in login page , because of running in some other port. docker issue ?

current compose file:-

version: '3.7'

services: app: image: matomo:4.7-apache restart: always volumes: - data:/var/www/html environment: MATOMO_DATABASE-HOST: db ports: - 8091:80 depends_on: - db db: image: mysql:5.7 container_name: mysql volumes: - db:/var/lib/mysql restart: always env_file: - matomo.env ports: - 33061:3306

volumes: db: data:

pixar634 avatar Feb 18 '22 17:02 pixar634

If your services are running, the simplest would be to use Docker-compose's exec command to run arbitrary commands inside the running container. I believe this would solve your problem:

docker-compose exec app sed -i \
    $'/^\[General\]/ { a trusted_hosts[] = "localhost:8091"\n; :l; n; b l; }' \
    config/config.ini.php

You could also use docker cp to copy the file out of and back into the container; or docker-compose exec with cat and tee.

nepella avatar Feb 25 '22 21:02 nepella

Blocked by https://github.com/matomo-org/matomo/issues/10257

J0WI avatar Nov 26 '22 14:11 J0WI