From 8fa797a362043232f3b6cc679b7e2b42570d56e0 Mon Sep 17 00:00:00 2001 From: Bertrand Benjamin Date: Sun, 20 Feb 2022 09:35:39 +0100 Subject: [PATCH] Feat: basic matomo deployement --- .gitignore | 3 +++ matomo/.env | 11 +++++++++++ matomo/docker-compose.yml | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 matomo/.env create mode 100644 matomo/docker-compose.yml diff --git a/.gitignore b/.gitignore index 09aecbe..d8b55b7 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,6 @@ traefik/certs/ traefik/log/ minio/data + +matomo/html/ +matomo/db/ diff --git a/matomo/.env b/matomo/.env new file mode 100644 index 0000000..59dda80 --- /dev/null +++ b/matomo/.env @@ -0,0 +1,11 @@ +MATOMO_DATABASE_HOST=db +MATOMO_DATABASE_ADAPTER=mysql +MATOMO_DATABASE_TABLES_PREFIX=matomo_ +MATOMO_DATABASE_USERNAME=MYUSER +MATOMO_DATABASE_PASSWORD=MYPASSWORD +MATOMO_DATABASE_DBNAME=MYDATABASE + + +MYSQL_PASSWORD=$MATOMO_DATABASE_PASSWORD +MYSQL_DATABASE=$MATOMO_DATABASE_DBNAME +MYSQL_USER=$MATOMO_DATABASE_USERNAME diff --git a/matomo/docker-compose.yml b/matomo/docker-compose.yml new file mode 100644 index 0000000..33040f8 --- /dev/null +++ b/matomo/docker-compose.yml @@ -0,0 +1,34 @@ +version: "3.7" +services: + db: + image: mariadb:10 + command: --max-allowed-packet=64MB + volumes: + - ./db:/var/lib/mysql + environment: + MYSQL_RANDOM_ROOT_PASSWORD: 'yes' + env_file: + - ./.env + networks: + - matomo + + matomo: + image: matomo:latest + volumes: + - ./html:/var/www/html + env_file: + - ./.env + labels: + - "traefik.enable=true" + - "traefik.http.routers.matomo.rule=Host(`matomo.combava.lan`)" + - "traefik.http.routers.matomo.entrypoints=https" + - "traefik.http.routers.matomo.tls=true" + - "traefik.http.services.matomo.loadbalancer.server.port=80" + networks: + - matomo + - gateway + +networks: + matomo: + gateway: + external: true