diff --git a/.env.example b/.env.example deleted file mode 100644 index ad37eea9..00000000 --- a/.env.example +++ /dev/null @@ -1,56 +0,0 @@ -# ╔══════════════════════════════════════════════════════════════════════════╗ -# ║ Local development ║ -# ║ ║ -# ║ Choose ONE option: JSON dump, TCP database, or HTTP database. ║ -# ╚══════════════════════════════════════════════════════════════════════════╝ - -# LAN / remote dev: set this machine's IP so the dev server accepts cross-origin requests -# NEXT_DEV_ALLOWED_ORIGINS=10.112.9.49 - -# Option A: JSON dump (no database needed) -# Download a DB dump release, unzip it, and point this to the directory. -# See README for setup instructions. -# DUMP_DIR=./inferencex-dump/inferencex-dump-2026-03-30 - -# Option B: TCP database (postgres.js — works with any Postgres instance) -# DATABASE_READONLY_URL=postgresql://postgres:postgres@localhost:5432/postgres -# DATABASE_DRIVER=postgres -# DATABASE_SSL=false - -# Option C: HTTP database (Neon serverless driver — requires a Neon-hosted instance) -# DATABASE_READONLY_URL= -# DATABASE_DRIVER=neon -# DATABASE_SSL=true - -# GitHub PAT (optional) — improves rate limits for star count and workflow metadata -# Create at: https://github.com/settings/personal-access-tokens -# GITHUB_TOKEN= - -# ╔══════════════════════════════════════════════════════════════════════════╗ -# ║ Production deployment (Vercel) ║ -# ║ ║ -# ║ Set these in the Vercel dashboard. All are required. ║ -# ╚══════════════════════════════════════════════════════════════════════════╝ - -# DATABASE_READONLY_URL= -# DATABASE_DRIVER=neon -# DATABASE_SSL=true -# BLOB_CACHE_PREFIX= -# BLOB_READ_WRITE_TOKEN= -# GITHUB_TOKEN= - -# PostHog analytics -# NEXT_PUBLIC_POSTHOG_KEY= -# NEXT_PUBLIC_POSTHOG_HOST= -# POSTHOG_PERSONAL_API_KEY= -# POSTHOG_PROJECT_ID= - -# ╔══════════════════════════════════════════════════════════════════════════╗ -# ║ Database administration (DO NOT SHARE) ║ -# ║ ║ -# ║ Only needed for running DB scripts (migrate, ingest, reset, etc). ║ -# ║ Not needed for running the app. ║ -# ╚══════════════════════════════════════════════════════════════════════════╝ - -# DATABASE_WRITE_URL= -# INVALIDATE_SECRET= diff --git a/.github/workflows/tests-e2e.yml b/.github/workflows/tests-e2e.yml index 96f71bc9..5e205667 100644 --- a/.github/workflows/tests-e2e.yml +++ b/.github/workflows/tests-e2e.yml @@ -86,6 +86,18 @@ jobs: run: pnpm install --frozen-lockfile env: CYPRESS_INSTALL_BINARY: '0' + - name: Create CI env file + env: + DATABASE_READONLY_URL: ${{ secrets.DATABASE_READONLY_URL }} + GITHUB_TOKEN: ${{ secrets.INFX_MAIN_PAT }} + run: | + DB_URL="${DATABASE_READONLY_URL:-postgresql://postgres:postgres@localhost:5432/postgres}" + cat > .env <; +} diff --git a/packages/app/src/app/layout.tsx b/packages/app/src/app/layout.tsx index 93088655..63cf81bf 100644 --- a/packages/app/src/app/layout.tsx +++ b/packages/app/src/app/layout.tsx @@ -4,6 +4,7 @@ import './globals.css'; import { Analytics } from '@vercel/analytics/next'; import { SpeedInsights } from '@vercel/speed-insights/next'; import type { Metadata } from 'next'; +import { headers } from 'next/headers'; import { DM_Sans } from 'next/font/google'; import localFont from 'next/font/local'; @@ -168,6 +169,8 @@ export default async function RootLayout({ }: Readonly<{ children: React.ReactNode; }>) { + const requestHeaders = await headers(); + const isEmbedRoute = requestHeaders.get('x-inferencex-embed') === '1'; const starCount = await fetchStarCount(); return ( @@ -191,9 +194,9 @@ export default async function RootLayout({ disableTransitionOnChange > -
+ {!isEmbedRoute &&
}
{children}
-