plausible / analytics

Simple, open source, lightweight (< 1 KB) and privacy-friendly web analytics alternative to Google Analytics.
https://plausible.io
GNU Affero General Public License v3.0
18.98k stars 1.02k forks source link

add /var/lib/plausible #4275

Open ruslandoga opened 1 week ago

ruslandoga commented 1 week ago

Changes

This PR aims to simplify permissions in $DATA_DIR volume mounted into Plausible container. After adding automatic TLS we would be mounting a volume in docker-compose.yml by default to persist the certificates across restarts, so I thought we might as well allow writes for it by default too.

Before

User needs to create a directory on the host and set the correct permissions manually. After that it can be mounted into the container.

console

$ cd hosting
$ mkdir ./data
$ chown -R 999:nogroup ./data

docker-compose.yml

plausible:
  volumes:
    - ./data:/data
  environment:
    - DATA_DIR=/data

After

A named volume can be mounted into the container without any extra steps.

docker-compose.yml

plausible:
  volumes:
    - plausible-data:/var/lib/plausible

volumes:
  plausible-data:

Tests

Changelog

Documentation

Dark mode