version: '3'
services:
mysql:
image: mysql:8
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: matomo
matomo:
image: matomo:4
ports:
- 4000:80
This lets me in at localhost:4000 and I just enter "mysql" as the DB host, "root" as the username & password and "matomo" as the database name, and it's basically done.Of course, I probably have to point it out or someone else will, that it's a bad idea to be using the MySQL root user, instead of creating a user with the rights that Matomo needs: https://matomo.org/faq/how-to-install/faq_23484/