mirror of
https://github.com/Dokploy/templates.git
synced 2026-07-15 14:52:05 -05:00
[PR #1028] feat: add PostHog template #16336
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Dokploy/templates/pull/1028
Author: @Siumauricio
Created: 7/14/2026
Status: 🔄 Open
Base:
canary← Head:feat/posthog📝 Commits (2)
7f3a08efeat: add PostHog template3eb1d3bfix: stop plugins service crash loop (logs-redis TLS default)📊 Changes
5 files changed (+775 additions, -0 deletions)
View changed files
➕
blueprints/posthog/docker-compose.yml(+646 -0)➕
blueprints/posthog/instructions.md(+27 -0)➕
blueprints/posthog/meta.json(+19 -0)➕
blueprints/posthog/posthog.svg(+10 -0)➕
blueprints/posthog/template.toml(+73 -0)📄 Description
Summary
Adds a PostHog template based on the official hobby deployment, trimmed to run on a single server.
Architecture (20 services)
web(Django + migrations),worker(Celery + scheduler)plugins(CDP destinations/workflows, realtime cohorts, flag evaluation scheduler),ingestion-general(event ingestion),ingestion-sessionreplay(replay blob ingestion),recording-api(replay playback)capture,replay-capture,feature-flags,hypercache-serverlivestream(live events tail)proxy(Caddy path router, single exposed domain on port 80)db(Postgres 15),redis7,kafka(Redpanda, tuned down for small servers),zookeeper,clickhouse(24.8),objectstorage(MinIO)init-assets(fetches ClickHouse config, Kafka table schemas, funnel UDFs and the GeoIP DB at the pinned ref),kafka-init(creates topics)PostHog no longer publishes tagged releases, so images are pinned to a tested master commit via
POSTHOG_VERSION/POSTHOG_NODE_VERSIONenv variables (documented ininstructions.md).Compared to the full upstream hobby stack, this omits Temporal + Elasticsearch (data warehouse / batch exports), browserless (dashboard exports), and the error-tracking/logs/traces ingestion pipelines. Product analytics, feature flags, experiments, surveys, session replay, live events and CDP destinations all work.
Requirements
instructions.md)Evidence (deployed on the demo instance)
0;db/redis7/kafka/clickhouse/webhealthchecks greenGET /→ 302 →/preflight→ 200<title>PostHog·/signup,/login→ 200 ·/_health→okPOST /api/signup/→ 201POST /i/v0/e/→ 200{"status":"Ok"}(Rust capture → Redpanda → plugin-server ingestion → ClickHouse), then read back via HogQLPOST /api/environments/1/query/→ 200 with the event row returnedPOST /flags/?v=2→ 200{"errorsWhileComputingFlags":false,...}pluginsservice crash-looped every ~2.5 min (RestartCount 47) becauseLOGS_REDIS_TLSdefaults totruein production images and the default plugin-server mode starts the logs-ingestion consumer — its TLS handshake against plaintext Redis timed out repeatedly until the process killed itself. Fixed by constraining the service to the capability groups this template ships (NODEJS_CAPABILITY_GROUPS=cdp_workflows,realtime_cohorts,feature_flags) and pinningLOGS_REDIS_TLS/TRACES_REDIS_TLStofalse. After the fix: RestartCount 0, stable.node build-scripts/generate-meta.js --checkpasses (477 templates validated).Closes #116
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.