-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.plausible.yml
83 lines (83 loc) · 2.25 KB
/
docker-compose.plausible.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
version: "3.8"
services:
plausible_mail:
image: bytemark/smtp
container_name: plausible_mail
restart: unless-stopped
env_file:
- plausible.env
networks:
- plausible_net
labels:
- "traefik.enable=false"
plausible_db:
image: postgres:12
container_name: plausible_db
restart: unless-stopped
volumes:
- ~/plausible/postgres:/var/lib/postgresql/data
env_file:
- plausible.env
networks:
- plausible_net
plausible_events_db:
image: yandex/clickhouse-server:latest
container_name: plausible_events_db
restart: unless-stopped
volumes:
- ~/plausible/event-data:/var/lib/clickhouse
- ./clickhouse/clickhouse-config.xml:/etc/clickhouse-server/config.d/logging.xml:ro
- ./clickhouse/clickhouse-user-config.xml:/etc/clickhouse-server/users.d/logging.xml:ro
ulimits:
nofile:
soft: 262144
hard: 262144
networks:
- plausible_net
plausible:
image: plausible/analytics:latest
container_name: plausible
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "2"
command: sh -c "sleep 10 && /entrypoint.sh db createdb && /entrypoint.sh db migrate && /entrypoint.sh db init-admin && /entrypoint.sh run"
restart: unless-stopped
depends_on:
- plausible_db
- plausible_events_db
- plausible_mail
- geoip
expose:
- "8000"
env_file:
- plausible.env
environment:
- GEOLITE2_COUNTRY_DB=/geoip/GeoLite2-Country.mmdb
volumes:
- ~/plausible/geoip:/geoip:ro
networks:
- plausible_net
- web
labels:
- "traefik.docker.network=sushii-2_web"
- "traefik.http.routers.plausible.rule=Host(`analytics.sushii.xyz`)"
- "traefik.http.routers.plausible.entrypoints=secure"
- "traefik.http.routers.plausible.tls.certresolver=acme"
geoip:
image: maxmindinc/geoipupdate
container_name: plausible_geoip
environment:
- GEOIPUPDATE_EDITION_IDS=GeoLite2-Country
- GEOIPUPDATE_FREQUENCY=168 # update every 7 days
env_file:
- plausible.env
volumes:
- ~/plausible/geoip:/usr/share/GeoIP
networks:
web:
external:
name: sushii-2_web
plausible_net:
external: false