49 lines
1.3 KiB
YAML
49 lines
1.3 KiB
YAML
---
|
|
|
|
services:
|
|
db:
|
|
image: mariadb:lts
|
|
container_name: ${MARIADB_CONTAINER_NAME:-mariadb}
|
|
image: ${MARIADB_IMAGE:-mariadb:lts}
|
|
command: --max-allowed-packet=64MB
|
|
restart: always
|
|
volumes:
|
|
- db:/var/lib/mysql:Z
|
|
- /etc/timezone:/etc/timezone:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
environment:
|
|
- MARIADB_AUTO_UPGRADE=1
|
|
- MARIADB_DATABASE=matomo
|
|
- MARIADB_DISABLE_UPGRADE_BACKUP=1
|
|
- MARIADB_INITDB_SKIP_TZINFO=1
|
|
- MARIADB_PASSWORD=${MARIADB_PASSWORD:?err}
|
|
- MARIADB_ROOT_PASSWORD=${MARIADB_ROOT_PASSWORD:?err}
|
|
- MARIADB_USER=matomo
|
|
|
|
app:
|
|
container_name: ${MATOMO_CONTAINER_NAME:-matomo}
|
|
image: ${MATOMO_IMAGE:-matomo:4.1.1-apache}
|
|
restart: always
|
|
volumes:
|
|
# - ./config:/var/www/html/config:z
|
|
# - ./logs:/var/www/html/logs:z
|
|
- matomo:/var/www/html:z
|
|
- /etc/timezone:/etc/timezone:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
depends_on:
|
|
- db
|
|
environment:
|
|
- MATOMO_DATABASE_ADAPTER=mysql
|
|
- MATOMO_DATABASE_DBNAME=matomo
|
|
- MATOMO_DATABASE_HOST=db
|
|
- MATOMO_DATABASE_PASSWORD=${MARIADB_PASSWORD:?err}
|
|
- MATOMO_DATABASE_TABLES_PREFIX=matomo_
|
|
- MATOMO_DATABASE_USERNAME=matomo
|
|
ports:
|
|
- 8080:80
|
|
|
|
volumes:
|
|
db:
|
|
matomo:
|
|
name: ${MATOMO_VOLUME_NAME:-matomo}
|