Przejdź do treści
Biblioteka skilli
DevOps i chmura · Automatyzacja

posthog-deploy-integration

/posthog-deploy-integration

Wdraża integracje PostHog na Vercel, Fly.io i Cloud Run: aplikacje z PostHog w produkcji, sekrety specyficzne dla platformy i potoki wdrożeniowe.

Repozytorium
agent ↗
Licencja
MIT
Ostatnia zmiana repozytorium
14.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
4
Przestarzałość

Brak sygnałów. Repozytorium zmienione 14.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Wdraża integracje PostHog na Vercel, Fly.io i Cloud Run: aplikacje z PostHog w produkcji, sekrety specyficzne dla platformy i potoki wdrożeniowe.

Wyzwalacze z opisu

deploy posthogposthog Vercelposthog production deployposthog Cloud Runposthog Fly.io
Oryginalny opis (EN)

Deploy PostHog integrations to Vercel, Fly.io, and Cloud Run platforms. Use when deploying PostHog-powered applications to production, configuring platform-specific secrets, or setting up deployment pipelines. Trigger with phrases like "deploy posthog", "posthog Vercel", "posthog production deploy", "posthog Cloud Run", "posthog Fly.io".

Jak działa

  1. Overview
  2. Prerequisites
  3. Vercel Deployment
  4. Fly.io Deployment
  5. Google Cloud Run
  6. Environment Configuration Pattern
  7. Health Check Endpoint
  8. Instructions
  9. Output
  10. Error Handling
Sekcje z nagłówków SKILL.md, w oryginale · 196 linii, 510 słów
Podgląd SKILL.md
---
name: posthog-deploy-integration
description: |
  Deploy PostHog integrations to Vercel, Fly.io, and Cloud Run platforms.
  Use when deploying PostHog-powered applications to production,
  configuring platform-specific secrets, or setting up deployment pipelines.
  Trigger with phrases like "deploy posthog", "posthog Vercel",
  "posthog production deploy", "posthog Cloud Run", "posthog Fly.io".
allowed-tools: Read, Write, Edit, Bash(vercel:*), Bash(fly:*), Bash(gcloud:*)
version: 1.0.0
license: MIT
author: Jeremy Longshore <jeremy@intentsolutions.io>
---

# PostHog Deploy Integration

## Overview
Deploy PostHog-powered applications to popular platforms with proper secrets management.

## Prerequisites
- PostHog API keys for production environment
- Platform CLI installed (vercel, fly, or gcloud)
- Application code ready for deployment
- Environment variables documented

## Vercel Deployment

### Environment Setup
```bash
# Add PostHog secrets to Vercel
vercel secrets add posthog_api_key sk_live_***
vercel secrets add posthog_webhook_secret whsec_***

# Link to project
vercel link

# Deploy preview
vercel

# Deploy production
vercel --prod
```

### vercel.json Configuration
```json
{
  "env": {
    "POSTHOG_API_KEY": "@posthog_api_key"
  },
  "functions": {
    "api/**/*.ts": {
      "maxDuration": 30
    }
  }
}
```

## Fly.io Deployment

### fly.toml
```toml
app = "my-posthog-app"
primary_region = "iad"

[env]
  NODE_ENV = "production"

[http_service]
  internal_port = 3000
  force_https = true
  auto_stop_machines = true
  auto_start_machines = true
```

### Secrets
```bash
# Set PostHog secrets
fly secrets set POSTHOG_API_KEY=sk_live_***
fly secrets set POSTHOG_WEBHOOK_SECRET=whsec_***

# Deploy
fly deploy
```

## Google Cloud Run

### Dockerfile
```dockerfile
FROM node:20-slim
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
CMD ["npm", "start"]
```

### Deploy Script
```bash
#!/bin/bash
# deploy-cloud-run.sh

PROJECT_ID="${GOOGLE_CLOUD_PROJECT}"
SERVICE_NAME="posthog-service"
REGION="us-central1"

# Build and push image
gcloud builds submit --tag gcr.io/$PROJECT_ID/$SERVICE_NAME

# Deploy to Cloud Run
gcloud run deploy $SERVICE_NAME \
  --image gcr.io/$PROJECT_ID/$SERVICE_NAME \
  --region $REGION \
  --platform managed \
  --allow-unauthenticated \
  --set-secrets=POSTHOG_API_KEY=posthog-api-key:latest
```

## Environment Configuration Pattern

```typescript
// config/posthog.ts
interface PostHogConfig {
  apiKey: string;
  environment: 'development' | 'staging' | 'production';
  webhookSecret?: string;
}

export function getPostHogConfig(): PostHogConfig {
  const env = process.env.NODE_ENV || 'development';

  return {
    apiKey: process.env.POSTHOG_API_KEY!,
    environment: env as PostHogConfig['environment'],
    webhookSecret: process.env.POSTHOG_WEBHOOK_SECRET,
  };
}
```

## Health Check Endpoint

```typescript
// api/health.ts
export async function GET() {
  const posthogStatus = await checkPostHogConnection();

  return Response.json({
    status: posthogStatus ? 'healthy' : 'degraded',
    services: {
      posthog: posthogStatus,
    },
    timestamp: new Date().toISOString(),
  });
}
```

## Instructions

### Step 1: Choose Deployment Platform
Select the platform that best fits your infrastructure needs and follow the platform-specific guide below.

### Step 2: Configure Secrets
Store PostHog API keys securely using the platform's secrets management.

### Step 3: Deploy Application
Use the platform CLI to deploy your application with PostHog integration.

### Step 4: Verify Health
Test the health check endpoint to confirm PostHog connectivity.

## Output
- Application deployed to production
- PostHog secrets securely configured
- Health check endpoint functional
- Environment-specific configuration in place

## Error Handling
| Issue | Cause | Solution |
|-------|-------|----------|
| Secret not found | Missing configuration | Add secret via platform CLI |
| Deploy timeout | Large build | Increase build timeout |
| Health check fails | Wrong API key | Verify environment variable |
| Cold start issues | No warm-up | Configure minimum instances |

## Examples

### Quick Deploy Script
```bash
#!/bin/bash
# Platform-agnostic deploy helper
case "$1" in
  vercel)
    vercel secrets add posthog_api_key "$POSTHOG_API_KEY"
    vercel --prod
    ;;
  fly)
    fly secrets set POSTHOG_API_KEY="$POSTHOG_API_KEY"
    fly deploy
    ;;
esac
```

## Resources
- [Vercel Documentation](https://vercel.com/docs)
- [Fly.io Documentation](https://fly.io/docs)
- [Cloud Run Documentation](https://cloud.google.com/run/docs)
- [PostHog Deploy Guide](https://docs.posthog.com/deploy)

## Next Steps
For webhook handling, see `posthog-webhooks-events`.

Wersje

RepozytoriumWynikLicencja
Ta strona · HelixDevelopment/agent100MIT
jeremylongshore/tons-of-skills-marketplace100MIT

Migawka bazy z 28.10.2026 · wersja paczki da085b6bd2e3 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100vercel-deploy-integration
    Wdraża integracje Vercel na platformy Vercel, Fly.io i Cloud Run, w tym sekrety platform i potoki wdrożeniowe.
  • 100hex-deploy-integration
    Wdraża integracje Hex na Vercel, Fly.io i Cloud Run, konfiguruje sekrety platform i potoki wdrożeniowe.
  • 100firecrawl-deploy-integration
    Wdraża integracje FireCrawl na Vercel, Fly.io i Cloud Run: sekrety dla platform i potoki wdrożeniowe aplikacji produkcyjnych.
  • 100framer-deploy-integration
    Wdraża integracje Framer na Vercel, Fly.io i Cloud Run: wdrożenie produkcyjne, sekrety platform i potoki wdrożeniowe.
  • 100vercel-deploy
    Wdraża aplikacje i strony na Vercel na prośbę o deploy, link do wdrożenia lub wdrożenie preview.
  • 100vercel-deploy
    Wdraża aplikacje i strony na Vercel na prośbę o deploy, link do wdrożenia lub wdrożenie preview.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.