[PR #1028] feat: add PostHog template #16336

Open
opened 2026-07-14 23:19:40 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Dokploy/templates/pull/1028
Author: @Siumauricio
Created: 7/14/2026
Status: 🔄 Open

Base: canaryHead: feat/posthog


📝 Commits (2)

  • 7f3a08e feat: add PostHog template
  • 3eb1d3b fix: 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)

Group Services
App web (Django + migrations), worker (Celery + scheduler)
Plugin server (Node) plugins (CDP destinations/workflows, realtime cohorts, flag evaluation scheduler), ingestion-general (event ingestion), ingestion-sessionreplay (replay blob ingestion), recording-api (replay playback)
Rust services capture, replay-capture, feature-flags, hypercache-server
Realtime livestream (live events tail)
Router proxy (Caddy path router, single exposed domain on port 80)
Data stores db (Postgres 15), redis7, kafka (Redpanda, tuned down for small servers), zookeeper, clickhouse (24.8), objectstorage (MinIO)
Init (run once) 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_VERSION env variables (documented in instructions.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

  • RAM: at least 8 GB free is strongly recommended (documented in instructions.md)
  • ~15 GB free disk; first boot takes 5-10 minutes (migrations + init containers)

Evidence (deployed on the demo instance)

  • All 20 containers running/stable for 2+ hours; init containers exited 0; db/redis7/kafka/clickhouse/web healthchecks green
  • GET / → 302 → /preflight → 200 <title>PostHog · /signup, /login → 200 · /_healthok
  • First-user signup via POST /api/signup/201
  • End-to-end ingestion smoke test: event sent to POST /i/v0/e/200 {"status":"Ok"} (Rust capture → Redpanda → plugin-server ingestion → ClickHouse), then read back via HogQL POST /api/environments/1/query/200 with the event row returned
  • Feature flags: POST /flags/?v=2200 {"errorsWhileComputingFlags":false,...}
  • Fixed during validation: the plugins service crash-looped every ~2.5 min (RestartCount 47) because LOGS_REDIS_TLS defaults to true in 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 pinning LOGS_REDIS_TLS/TRACES_REDIS_TLS to false. After the fix: RestartCount 0, stable.

node build-scripts/generate-meta.js --check passes (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.

## 📋 Pull Request Information **Original PR:** https://github.com/Dokploy/templates/pull/1028 **Author:** [@Siumauricio](https://github.com/Siumauricio) **Created:** 7/14/2026 **Status:** 🔄 Open **Base:** `canary` ← **Head:** `feat/posthog` --- ### 📝 Commits (2) - [`7f3a08e`](https://github.com/Dokploy/templates/commit/7f3a08eb00067deda2e200c612e5dac639c94c58) feat: add PostHog template - [`3eb1d3b`](https://github.com/Dokploy/templates/commit/3eb1d3b7bd3382b7a8d07e8665fe1d79a291ba6a) fix: stop plugins service crash loop (logs-redis TLS default) ### 📊 Changes **5 files changed** (+775 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `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) </details> ### 📄 Description ## Summary Adds a **PostHog** template based on the official [hobby deployment](https://github.com/PostHog/posthog/blob/master/docker-compose.hobby.yml), trimmed to run on a single server. ## Architecture (20 services) | Group | Services | |---|---| | App | `web` (Django + migrations), `worker` (Celery + scheduler) | | Plugin server (Node) | `plugins` (CDP destinations/workflows, realtime cohorts, flag evaluation scheduler), `ingestion-general` (event ingestion), `ingestion-sessionreplay` (replay blob ingestion), `recording-api` (replay playback) | | Rust services | `capture`, `replay-capture`, `feature-flags`, `hypercache-server` | | Realtime | `livestream` (live events tail) | | Router | `proxy` (Caddy path router, single exposed domain on port 80) | | Data stores | `db` (Postgres 15), `redis7`, `kafka` (Redpanda, tuned down for small servers), `zookeeper`, `clickhouse` (24.8), `objectstorage` (MinIO) | | Init (run once) | `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_VERSION` env variables (documented in `instructions.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 - **RAM: at least 8 GB free is strongly recommended** (documented in `instructions.md`) - ~15 GB free disk; first boot takes 5-10 minutes (migrations + init containers) ## Evidence (deployed on the demo instance) - All 20 containers running/stable for 2+ hours; init containers exited `0`; `db`/`redis7`/`kafka`/`clickhouse`/`web` healthchecks green - `GET /` → 302 → `/preflight` → 200 `<title>PostHog` · `/signup`, `/login` → 200 · `/_health` → `ok` - First-user signup via `POST /api/signup/` → **201** - End-to-end ingestion smoke test: event sent to `POST /i/v0/e/` → **200 `{"status":"Ok"}`** (Rust capture → Redpanda → plugin-server ingestion → ClickHouse), then read back via HogQL `POST /api/environments/1/query/` → **200** with the event row returned - Feature flags: `POST /flags/?v=2` → **200** `{"errorsWhileComputingFlags":false,...}` - Fixed during validation: the `plugins` service crash-looped every ~2.5 min (RestartCount 47) because `LOGS_REDIS_TLS` defaults to `true` in 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 pinning `LOGS_REDIS_TLS`/`TRACES_REDIS_TLS` to `false`. After the fix: RestartCount 0, stable. `node build-scripts/generate-meta.js --check` passes (477 templates validated). Closes #116 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-07-14 23:19:40 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/templates#16336