# ignore: true # documentation: https://plausible.io/docs/self-hosting # slogan: "Plausible Analytics is a simple, open-source, lightweight (< 1 KB) and privacy-friendly web analytics alternative to Google Analytics." # tags: analytics, privacy, google, alternative # port: 8000 services: plausible: image: "ghcr.io/plausible/community-edition:v2.1.0" command: 'sh -c "sleep 10 && /entrypoint.sh db createdb && /entrypoint.sh db migrate && /entrypoint.sh run"' environment: - "DATABASE_URL=postgres://postgres:$SERVICE_PASSWORD_POSTGRES@plausible_db/plausible" - BASE_URL=$SERVICE_FQDN_PLAUSIBLE - SECRET_KEY_BASE=$SERVICE_BASE64_64_PLAUSIBLE - TOTP_VAULT_KEY=$SERVICE_BASE64_TOTP depends_on: - plausible_db - plausible_events_db - mail mail: image: bytemark/smtp plausible_db: image: "postgres:14-alpine" volumes: - "db-data:/var/lib/postgresql/data" environment: - POSTGRES_DB=plausible - POSTGRES_PASSWORD=$SERVICE_PASSWORD_POSTGRES plausible_events_db: image: "clickhouse/clickhouse-server:24.3.3.102-alpine" volumes: - type: volume source: event-data target: /var/lib/clickhouse - type: bind source: ./clickhouse/clickhouse-config.xml target: /etc/clickhouse-server/config.d/logging.xml read_only: true content: "00" - type: bind source: ./clickhouse/clickhouse-user-config.xml target: /etc/clickhouse-server/users.d/logging.xml read_only: true content: 'warningtrue' ulimits: nofile: soft: 262144 hard: 262144