forked from crazy-max/docker-matomo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
87 lines (81 loc) · 2.03 KB
/
docker-compose.yml
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
version: "3.2"
services:
traefik:
image: traefik:1.7-alpine
container_name: traefik
command:
- "--logLevel=INFO"
- "--defaultentrypoints=http,https"
- "--entryPoints=Name:http Address::80 Redirect.EntryPoint:https"
- "--entryPoints=Name:https Address::443 TLS"
- "--docker"
- "--docker.exposedbydefault=false"
- "--docker.domain=example.com"
- "--acme=true"
- "--acme.acmelogging=true"
- "--acme.storage=acme.json"
- "--acme.entryPoint=https"
- "--acme.onhostrule=true"
- "--acme.httpchallenge=true"
- "--acme.httpchallenge.entrypoint=http"
ports:
- target: 80
published: 80
protocol: tcp
- target: 443
published: 443
protocol: tcp
volumes:
- "./acme.json:/acme.json"
- "/var/run/docker.sock:/var/run/docker.sock"
restart: always
db:
image: mariadb:10.2
container_name: matomo_db
volumes:
- "db:/var/lib/mysql"
environment:
- "MYSQL_ALLOW_EMPTY_PASSWORD=yes"
- "MYSQL_DATABASE=matomo"
- "MYSQL_USER=matomo"
- "MYSQL_PASSWORD=asupersecretpassword"
restart: always
redis:
image: redis:4.0-alpine
container_name: matomo_redis
restart: always
matomo:
image: crazymax/matomo:latest
container_name: matomo
depends_on:
- db
- redis
volumes:
- "matomo:/data"
labels:
- "traefik.enable=true"
- "traefik.backend=matomo"
- "traefik.port=8000"
- "traefik.frontend.rule=Host:matomo.example.com"
env_file:
- "./matomo.env"
restart: always
cron:
image: crazymax/matomo:latest
container_name: matomo_cron
depends_on:
- matomo
volumes:
- "matomo:/data"
env_file:
- "./matomo.env"
environment:
- "SIDECAR_CRON=1"
- "CRON_GEOIP=0 2 * * *"
- "CRON_ARCHIVE=0 * * * *"
- "ARCHIVE_OPTIONS=--concurrent-requests-per-website=3"
restart: always
volumes:
db:
matomo: