-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
51 lines (49 loc) · 1.35 KB
/
docker-compose.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
version: '3'
volumes:
matomo:
db:
services:
db:
networks:
- database
image: mariadb
container_name: mariadb-matomo
restart: always
command: --max-allowed-packet=64MB
volumes:
- db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=your-mysql-root-password
- MYSQL_DATABASE=matomo
- MYSQL_USER=matomo
- MYSQL_PASSWORD=your-mysql-password
matomo:
image: matomo
container_name: matomo
restart: always
networks:
- database
- traefik_proxy
environment:
- MATOMO_DATABASE_HOST=db
- MATOMO_DATABASE_USERNAME=matomo
- MATOMO_DATABASE_PASSWORD=your-mysql-password
- MATOMO_DATABASE_DBNAME=matomo
- PHP_MEMORY_LIMIT=512M
volumes:
- matomo:/var/www/html
labels:
# Enable traefik
- "traefik.enable=true"
# Router for Matomo application, only available over HTTPS
- "traefik.http.routers.matomo-secure.rule=Host(`your.matomo.domain`)"
- "traefik.http.routers.matomo-secure.tls=true"
- "traefik.http.routers.matomo-secure.middlewares=remove-xpowered"
- "traefik.http.routers.matomo-secure.tls.certresolver=http"
# Service details
- "traefik.http.services.matomo.loadbalancer.server.port=80"
- "traefik.docker.network=traefik_proxy"
networks:
database:
traefik_proxy:
external: true