plausible-hosting/docker-compose.yml

75 lines
1.7 KiB
YAML
Raw Normal View History

2020-09-29 07:00:52 -05:00
version: "3.3"
services:
mail:
image: bytemark/smtp
restart: always
geoip:
image: maxmindinc/geoipupdate
environment:
- GEOIPUPDATE_EDITION_IDS=GeoLite2-Country
- GEOIPUPDATE_FREQUENCY=168 # update every 7 days
env_file: env/geoip-conf.env
volumes:
- geoip:/usr/share/GeoIP
2020-09-29 07:00:52 -05:00
plausible_db:
image: postgres:12
volumes:
- db-data:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=postgres
networks:
- internal
restart: always
2020-09-29 07:00:52 -05:00
plausible_events_db:
image: yandex/clickhouse-server:latest
volumes:
- event-data:/var/lib/clickhouse
ulimits:
nofile:
soft: 262144
hard: 262144
networks:
- internal
restart: always
2020-09-29 07:00:52 -05:00
plausible:
2020-10-05 08:10:41 -05:00
image: plausible/analytics:latest
2020-10-01 07:50:23 -05:00
command: sh -c "sleep 10 && /entrypoint.sh db createdb && /entrypoint.sh db migrate && /entrypoint.sh db init-admin && /entrypoint.sh run"
2020-09-29 07:00:52 -05:00
depends_on:
- mail
- geoip
2020-09-29 07:00:52 -05:00
- plausible_db
- plausible_events_db
env_file:
- env/plausible-conf.env
networks:
- internal
- web
environment:
- GEOLITE2_COUNTRY_DB=/geoip/GeoLite2-Country.mmdb
volumes:
- geoip:/geoip:ro
restart: always
2020-10-29 18:33:03 -05:00
labels:
- "traefik.enable=true"
- "traefik.http.routers.plausible.rule=Host(`yourdomain.com`)" # replace this with your own domain
- "traefik.http.routers.plausible.entrypoints=websecure"
- "traefik.http.services.plausible.loadbalancer.server.port=8000"
2020-09-29 07:00:52 -05:00
volumes:
db-data:
driver: local
event-data:
driver: local
geoip:
driver: local
networks:
web:
external: true
internal:
external: false