mirror of
https://github.com/plausible/hosting.git
synced 2024-11-17 13:15:58 -06:00
75 lines
1.7 KiB
YAML
75 lines
1.7 KiB
YAML
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
|
|
|
|
plausible_db:
|
|
image: postgres:12
|
|
volumes:
|
|
- db-data:/var/lib/postgresql/data
|
|
environment:
|
|
- POSTGRES_PASSWORD=postgres
|
|
networks:
|
|
- internal
|
|
restart: always
|
|
|
|
plausible_events_db:
|
|
image: yandex/clickhouse-server:latest
|
|
volumes:
|
|
- event-data:/var/lib/clickhouse
|
|
ulimits:
|
|
nofile:
|
|
soft: 262144
|
|
hard: 262144
|
|
networks:
|
|
- internal
|
|
restart: always
|
|
|
|
plausible:
|
|
image: plausible/analytics:latest
|
|
command: sh -c "sleep 10 && /entrypoint.sh db createdb && /entrypoint.sh db migrate && /entrypoint.sh db init-admin && /entrypoint.sh run"
|
|
depends_on:
|
|
- mail
|
|
- geoip
|
|
- 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
|
|
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"
|
|
|
|
volumes:
|
|
db-data:
|
|
driver: local
|
|
event-data:
|
|
driver: local
|
|
geoip:
|
|
driver: local
|
|
|
|
networks:
|
|
web:
|
|
external: true
|
|
internal:
|
|
external: false
|