Coder Social home page Coder Social logo

ansible-role-plausible's Introduction

laurivan.plausible

This is a role to install Plausible via Docker.

Requirements

You need a machine with Docker installed.

Role Variables

Plausible depends on several components (SMTP, Clickhouse, PostgreSQL) and this role is designed to install them as a package. All variables are listed below (see also defaults/main.yml).

Plausible parameters

plausible_port defined the exposed port for the web site (including JS delivery and API):

plausible_port: 8000

You need an admin user to be able to access the site:

plausible_admin_user_email: [email protected]
plausible_admin_user_name: change-me
plausible_admin_user_pwd: change-me

The hosting URL of the server, used for URL generation must be specified:

plausible_base_url: change-me

Please define a long (>= 64 characters) secret key, which will be used by your instance to encrypt data:

plausible_secret_key_base: change-me

Email

Plausible can send various emails; for this it needs a SMTP relay. Following variables define the SMTP account from which emails will be sent:

plausible_smtp_host:
plausible_smtp_port: 587
plausible_smtp_username:
plausible_smtp_password:

If you don't define any, no emails will be sent and you'll need to look through the logs :)

The email on behalf of which messages are sent is defined by:

plausible_smtp_email: "[email protected]"

Database

Plausible depends on PostgreSQL and Clickhouse.

For PostgreSQL, you need to specify following variables:

plausible_db_host: "plausible_db"
plausible_db: "plausible"
plausible_db_password: "change_me"

If you want to expose the database port outside (e.g. for backup), please define plausible_db_port

For Clickhouse, you only need to define the version used:

plausible_clickhouse_version: "21.3.2.5"

Volumes

The role will create following paths used by the docker containers as volumes:

plausible_volume_base: "/mnt/plausible"
plausible_volume_config: "{{ plausible_volume_base }}/config"
plausible_volume_db: "{{ plausible_volume_base }}/db_data"
plausible_volume_events: "{{ plausible_volume_base }}/event_data"
plausible_volume_geoip: "{{ plausible_volume_base }}/geoip_data"

The plausible_volume_geoip is necessary to access MaxMind GeoIP data (see below).

GeoIP

Plausible defaults to DBIP, but can be configured to use MaxMind GeoIP. If you want to use MaxMind, you need to define:

plausible_geoip_db: "GeoLite2-Country.mmdb"

Dependencies

None

Example Playbook

---
- name: Example playbook
  hosts: services
  vars:
    plausible_port: "8100"
    plausible_base_url: "https://metrics.example.com"
    plausible_admin_user_email: "[email protected]"
    plausible_admin_user_name: "admin"
    plausible_admin_user_pwd: "change-me"
  roles:
    - 'laurivan.plausible'

License

MIT

Author Information

This role was created in 2022 by Laur Ivan.

ansible-role-plausible's People

Contributors

equinoxel avatar

Watchers

 avatar

Forkers

bertiewils

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.