2020-07-21 20:55:44 +01:00
|
|
|
version: "2.3"
|
|
|
|
|
|
|
|
services:
|
|
|
|
plausible:
|
2020-10-22 19:04:52 +01:00
|
|
|
image: plausible/analytics:v1.1
|
2020-08-04 19:38:01 +01:00
|
|
|
restart: unless-stopped
|
2020-08-04 22:07:45 +01:00
|
|
|
command: sh -c "/entrypoint.sh db migrate && /entrypoint.sh run"
|
2020-07-21 20:55:44 +01:00
|
|
|
depends_on:
|
|
|
|
- db
|
|
|
|
- clickhouse
|
2020-10-24 12:10:37 +01:00
|
|
|
- geoip
|
|
|
|
volumes:
|
|
|
|
- ./geoip:/mnt/geoip:ro
|
2020-07-21 20:55:44 +01:00
|
|
|
labels:
|
|
|
|
- traefik.enable=true
|
|
|
|
- traefik.http.routers.plausible.rule=Host(`plausible.theorangeone.net`)
|
2020-10-18 22:31:23 +01:00
|
|
|
- traefik.http.services.plausible-plausible.loadbalancer.server.port=8000 # https://github.com/plausible/analytics/pull/237
|
2020-07-21 20:55:44 +01:00
|
|
|
- traefik.http.routers.plausible.tls.certresolver=le
|
2020-07-22 12:18:49 +01:00
|
|
|
- traefik.http.routers.plausible.middlewares=compress@file
|
2020-11-25 11:11:29 +00:00
|
|
|
|
|
|
|
- traefik.http.routers.plausible-bare.rule=Host(`elbisualp.theorangeone.net`)
|
|
|
|
- traefik.http.routers.plausible-bare.tls.certresolver=le
|
|
|
|
- traefik.http.routers.plausible-bare.service=plausible-plausible
|
2020-11-25 11:38:47 +00:00
|
|
|
|
|
|
|
# https://github.com/plausible/analytics/pull/340
|
|
|
|
- "traefik.http.middlewares.plausible-index.replacepathregex.regex=/js/index.js"
|
|
|
|
- traefik.http.middlewares.plausible-index.replacepathregex.replacement=/js/plausible.js
|
|
|
|
- traefik.http.routers.plausible-bare.middlewares=compress@file,plausible-index
|
|
|
|
|
2020-07-21 20:55:44 +01:00
|
|
|
environment:
|
|
|
|
- SECRET_KEY_BASE={{ secret_key }}
|
|
|
|
- SIGNING_SALT={{ signing_salt }}
|
|
|
|
- DATABASE_URL=postgres://plausible:plausible@db:5432/plausible
|
|
|
|
- DISABLE_REGISTRATION=true
|
|
|
|
- DISABLE_SUBSCRIPTION=true
|
2020-09-17 15:18:01 +01:00
|
|
|
- CLICKHOUSE_DATABASE_URL=http://clickhouse:8123/plausible
|
2020-11-25 11:40:54 +00:00
|
|
|
- BASE_URL=https://elbisualp.theorangeone.net
|
2020-10-24 12:10:37 +01:00
|
|
|
- GEOLITE2_COUNTRY_DB=/mnt/geoip/GeoLite2-Country.mmdb
|
2020-07-21 20:55:44 +01:00
|
|
|
|
|
|
|
clickhouse:
|
2020-10-22 19:04:52 +01:00
|
|
|
image: yandex/clickhouse-server:20.6
|
2020-08-04 19:38:01 +01:00
|
|
|
restart: unless-stopped
|
2020-07-21 20:55:44 +01:00
|
|
|
volumes:
|
2020-10-03 17:18:11 +01:00
|
|
|
- ./clickhouse:/var/lib/clickhouse
|
|
|
|
- ./docker_related_config.xml:/etc/clickhouse-server/config.d/docker_related_config.xml:ro
|
|
|
|
- ./docker_related_user_config.xml:/etc/clickhouse-server/users.d/docker_related_user_config.xml:ro
|
2020-08-25 22:05:10 +01:00
|
|
|
tmpfs:
|
|
|
|
- /var/log/clickhouse-server
|
2020-07-21 20:55:44 +01:00
|
|
|
ulimits:
|
|
|
|
nofile:
|
|
|
|
soft: 262144
|
|
|
|
hard: 262144
|
|
|
|
|
|
|
|
db:
|
|
|
|
image: postgres:12-alpine
|
|
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
2020-08-22 12:19:47 +01:00
|
|
|
- /mnt/tank/dbs/postgres/plausible:/var/lib/postgresql/data
|
2020-07-21 20:55:44 +01:00
|
|
|
environment:
|
|
|
|
- POSTGRES_PASSWORD=plausible
|
|
|
|
- POSTGRES_USER=plausible
|
2020-10-24 12:10:37 +01:00
|
|
|
|
|
|
|
geoip:
|
|
|
|
image: maxmindinc/geoipupdate:latest
|
|
|
|
environment:
|
|
|
|
- GEOIPUPDATE_FREQUENCY=168
|
|
|
|
- GEOIPUPDATE_EDITION_IDS=GeoLite2-Country
|
|
|
|
- GEOIPUPDATE_ACCOUNT_ID={{ geoip_account_id }}
|
|
|
|
- GEOIPUPDATE_LICENSE_KEY={{ geoip_license_key }}
|
|
|
|
volumes:
|
|
|
|
- ./geoip:/usr/share/GeoIP
|