docker
docker copied to clipboard
Matomo config file
How do I access the matomo config file to remove the warning it shows in login page , because of running in some other port.
?
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:
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.
Blocked by https://github.com/matomo-org/matomo/issues/10257