Skip to content

Update Plausible template to v3.1.0 with enhanced ClickHouse configuration#643

Open
Eetezadi wants to merge 4 commits intoDokploy:canaryfrom
Eetezadi:plausible-update
Open

Update Plausible template to v3.1.0 with enhanced ClickHouse configuration#643
Eetezadi wants to merge 4 commits intoDokploy:canaryfrom
Eetezadi:plausible-update

Conversation

@Eetezadi
Copy link

@Eetezadi Eetezadi commented Jan 6, 2026

Summary

  • Updated Plausible Analytics template from v2.1 to v3.1.0
  • Added proper ClickHouse configuration with required environment variables
  • Fixed environment variable structure and port mappings

Changes

  • Updated Plausible image to v3.1.0-community
  • Added ClickHouse service with proper configuration
  • Set required ClickHouse environment variables (DB name, user, password)
  • Updated meta.json version to v3.1.0

Greptile Summary

Updated Plausible Analytics from v2.1.5 to v3.1.0-community with enhanced ClickHouse configuration. The template modernizes ClickHouse config files and updates PostgreSQL to v18.

Critical Issues:

  • Missing required version: "3.8" field in docker-compose.yml (violates Dokploy conventions)
  • Using ports instead of expose in docker-compose.yml (violates Dokploy conventions per AGENTS.md:150)
  • Missing critical environment variables (DATABASE_URL and CLICKHOUSE_DATABASE_URL) in template.toml that Plausible v3.1.0 requires to connect to databases

Positive Changes:

  • Properly updated ClickHouse configuration files with new structure (logs.xml, ipv4-only.xml, low-resources.xml)
  • Fixed volume mount paths from ../files/clickhouse/ to ./clickhouse/ for Dokploy compatibility
  • Added CLICKHOUSE_SKIP_USER_SETUP=1 for proper initialization
  • Updated meta.json version correctly to v3.1.0

Confidence Score: 2/5

  • This PR has critical issues that will prevent Plausible from working correctly
  • Score reflects three critical issues: missing required docker-compose version field, incorrect use of ports instead of expose (violating Dokploy conventions), and most critically, missing DATABASE_URL and CLICKHOUSE_DATABASE_URL environment variables that Plausible v3.1.0 requires to connect to its databases. Without these connection URLs, the application cannot function.
  • Pay close attention to docker-compose.yml (needs version field and expose fix) and template.toml (needs database connection environment variables)

Last reviewed commit: 8439269

(4/5) You can add custom instructions or style guidelines for the agent here!

Context used:

  • Context from dashboard - AGENTS.md (source)

…ation

- Upgrade Plausible Community Edition from v2.1.5 to v3.1.0
- Update PostgreSQL from 16-alpine to 18-alpine
- Update ClickHouse from 24.3.3.102-alpine to 25.12-alpine
- Add CLICKHOUSE_SKIP_USER_SETUP environment variable for ClickHouse
- Replace ClickHouse config files with optimized configurations:
  - logs.xml: Query logging with 30-day retention
  - ipv4-only.xml: Network binding configuration
  - low-resources.xml: Performance tuning for low-memory environments
@github-actions
Copy link

github-actions bot commented Jan 6, 2026

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
templates ✅ Ready (View Log) Visit Preview 0a7d75a

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Plausible Analytics template from v2.1.5 to v3.1.0, including upgrades to PostgreSQL 18 and ClickHouse 25.12, along with reorganized ClickHouse configuration files. The update aims to bring the template in line with Plausible's latest community edition release with enhanced ClickHouse configuration.

Changes:

  • Updated Plausible image from v2.1.5 to v3.1.0 and bumped PostgreSQL (16→18) and ClickHouse (24.3→25.12) versions
  • Reorganized ClickHouse configuration into three separate XML files (logs.xml, ipv4-only.xml, low-resources.xml) with improved settings for resource-constrained environments
  • Updated meta.json to reflect v3.1.0

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 8 comments.

File Description
meta.json Version number updated from v2.1.5 to v3.1.0
blueprints/plausible/docker-compose.yml Updated all service images, reorganized ClickHouse config volume mounts, added ports section, set CLICKHOUSE_SKIP_USER_SETUP=1
blueprints/plausible/template.toml Restructured ClickHouse configuration into three separate mount files with expanded settings for logging, networking, and resource limits

Comment on lines 8 to 9
environment:
- POSTGRES_PASSWORD=postgres
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The plausible_db service sets POSTGRES_PASSWORD but is missing POSTGRES_DB and POSTGRES_USER environment variables. While PostgreSQL has defaults (user: postgres, db: postgres), it's better to explicitly configure these. The Plausible service will also need a DATABASE_URL environment variable to connect to PostgreSQL. See aptabase blueprint (blueprints/aptabase/docker-compose.yml:8-9, 42) for a similar pattern where both the database and main service have properly configured connection strings.

Copilot uses AI. Check for mistakes.
Comment on lines 11 to 14
[config.env]
BASE_URL = "http://${main_domain}"
SECRET_KEY_BASE = "${secret_base}"
TOTP_VAULT_KEY = "${totp_key}"
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing required ClickHouse connection environment variables for the Plausible service. The PR description mentions "Set required ClickHouse environment variables (DB name, user, password)" but these are not present in the template.toml [config.env] section. Looking at similar blueprints (e.g., aptabase at blueprints/aptabase/docker-compose.yml:43), the Plausible service needs environment variables to connect to the ClickHouse database, such as CLICKHOUSE_DATABASE_URL. Additionally, DATABASE_URL for PostgreSQL connection should also be configured.

Copilot uses AI. Check for mistakes.
Comment on lines 11 to 14
[config.env]
BASE_URL = "http://${main_domain}"
SECRET_KEY_BASE = "${secret_base}"
TOTP_VAULT_KEY = "${totp_key}"
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description states "Added CLICKHOUSE_FLUSH_INTERVAL_SECONDS and CLICKHOUSE_MAX_BUFFER_SIZE" but these environment variables are not present in the code changes. If these environment variables are required for Plausible v3.1.0 to properly configure ClickHouse, they should be added to the [config.env] section of template.toml.

Copilot uses AI. Check for mistakes.
@Siumauricio
Copy link
Contributor

@greptile review

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 files reviewed, 4 comments

Edit Code Review Agent Settings | Greptile

@greptile-apps
Copy link

greptile-apps bot commented Feb 16, 2026

Additional Comments (1)

blueprints/plausible/template.toml
Missing critical ClickHouse and PostgreSQL connection URLs required by Plausible v3.1.0. Need to add DATABASE_URL pointing to plausible_db and CLICKHOUSE_DATABASE_URL pointing to plausible_events_db:8123

@Siumauricio
Copy link
Contributor

Hey, read our contributing guide https://github.com/Dokploy/templates/blob/canary/CONTRIBUTING.md

- Remove ports section (Dokploy handles port mapping via template.toml)
- Fix mount filePath prefix from / to ./ to match repo conventions
- Add explicit DATABASE_URL and CLICKHOUSE_DATABASE_URL env vars
@Eetezadi
Copy link
Author

Thanks for the review! I've read through the contributing guide and addressed the feedback:

Changes made:

Removed ports section — Dokploy handles port mapping via template.toml domains
Fixed mount filePath prefix — Changed from /clickhouse/... to ./clickhouse/... to match repo conventions
Added DATABASE_URL and CLICKHOUSE_DATABASE_URL — Explicit connection strings for PostgreSQL and ClickHouse
Feedback acknowledged but not changed (with reasoning):

version: "3.8" — Deprecated in Docker Compose v2+; no recent template in the repo uses it (aptabase, openpanel, rybbit all omit it)
CLICKHOUSE_DB/CLICKHOUSE_USER/CLICKHOUSE_PASSWORD — Official Plausible CE uses CLICKHOUSE_SKIP_USER_SETUP=1 with the default user (no password), which is the intended pattern for internal Docker networks
PostgreSQL 18 / ClickHouse 25.12 versions — Both tested and working with Plausible v3.1.0
POSTGRES_DB/POSTGRES_USER — PostgreSQL defaults to postgres/postgres which matches the DATABASE_URL connection string

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants