From 1406bcb4d2f6d10d4e45bf988c6b7c0d652d2fc1 Mon Sep 17 00:00:00 2001 From: Uke Date: Mon, 23 May 2022 08:08:16 +0200 Subject: [PATCH 1/2] Update and rename db.env to .env added more clear instructions for the .env - also using .env as a file name removes the need to call out the environment-file in docker-compose.yml. --- .examples/nginx/.env | 9 +++++++++ .examples/nginx/db.env | 8 -------- 2 files changed, 9 insertions(+), 8 deletions(-) create mode 100644 .examples/nginx/.env delete mode 100644 .examples/nginx/db.env diff --git a/.examples/nginx/.env b/.examples/nginx/.env new file mode 100644 index 00000000..955039cd --- /dev/null +++ b/.examples/nginx/.env @@ -0,0 +1,9 @@ +MARIADB_PASSWORD="" #you have to set your own passwords here +MARIADB_ROOT_PASSWORD="" #and here +MARIADB_DATABASE=matomo +MARIADB_USER=matomo +MATOMO_DATABASE_ADAPTER=mysql +MATOMO_DATABASE_TABLES_PREFIX=matomo_ +MATOMO_DATABASE_USERNAME=matomo +MATOMO_DATABASE_PASSWORD="" #and here +MATOMO_DATABASE_DBNAME=matomo diff --git a/.examples/nginx/db.env b/.examples/nginx/db.env deleted file mode 100644 index 9bb1fc0e..00000000 --- a/.examples/nginx/db.env +++ /dev/null @@ -1,8 +0,0 @@ -MYSQL_PASSWORD= -MYSQL_DATABASE=matomo -MYSQL_USER=matomo -MATOMO_DATABASE_ADAPTER=mysql -MATOMO_DATABASE_TABLES_PREFIX=matomo_ -MATOMO_DATABASE_USERNAME=matomo -MATOMO_DATABASE_PASSWORD= -MATOMO_DATABASE_DBNAME=matomo From 0afee204033970643de67029856cb2f6937ee9ae Mon Sep 17 00:00:00 2001 From: Uke Date: Mon, 23 May 2022 08:10:32 +0200 Subject: [PATCH 2/2] Update docker-compose.yml removed redundant .env-file calls, changed the mysql environment variables to reflect usage of mariaDB --- .examples/nginx/docker-compose.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.examples/nginx/docker-compose.yml b/.examples/nginx/docker-compose.yml index bc390dda..4df68120 100644 --- a/.examples/nginx/docker-compose.yml +++ b/.examples/nginx/docker-compose.yml @@ -8,9 +8,10 @@ services: volumes: - db:/var/lib/mysql environment: - - MYSQL_ROOT_PASSWORD= - env_file: - - ./db.env + - MARIADB_PASSWORD + - MARIADB_USER + - MARIADB_DATABASE + - MARIADB_ROOT_PASSWORD app: image: matomo:fpm-alpine @@ -18,15 +19,12 @@ services: links: - db volumes: - # - ./config:/var/www/html/config:rw - # - ./logs:/var/www/html/logs + - ./config:/var/www/html/config:rw + - ./logs:/var/www/html/logs - matomo:/var/www/html environment: - MATOMO_DATABASE_HOST=db - PHP_MEMORY_LIMIT=2048M - env_file: - - ./db.env - web: image: nginx:alpine restart: always