chore: import upstream snapshot with attribution
Lint and Format Check / lint-and-format (push) Failing after 0s
Check Migrations / Check for duplicate migration numbers (push) Failing after 1s
CI Pre-merge Check / CI Pre-merge Check (push) Failing after 2m17s

This commit is contained in:
wehub-resource-sync
2026-07-13 12:23:40 +08:00
commit 3a28426bf4
1399 changed files with 257375 additions and 0 deletions
+76
View File
@@ -0,0 +1,76 @@
# PostgreSQL Configuration (optional - defaults shown)
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_DB=insforge
# Port Configuration
# Change these to run multiple instances on the same host
POSTGRES_PORT=5432
POSTGREST_PORT=5430
APP_PORT=7130
AUTH_PORT=7131
DENO_PORT=7133
API_BASE_URL=http://localhost:7130
VITE_API_BASE_URL=http://localhost:7130
# Authentication
JWT_SECRET=your-secret-key-here-must-be-32-char-or-above
ROOT_ADMIN_USERNAME=admin
ROOT_ADMIN_PASSWORD=change-this-password
# Encryption key for secrets and database encryption (will use JWT_SECRET if not provided)
ENCRYPTION_KEY=
# Worker timeout in milliseconds (default: 60000 ms)
WORKER_TIMEOUT_MS=60000
# OpenRouter Configuration
# Get your API key from https://openrouter.ai/keys
OPENROUTER_API_KEY=
# Anonymous Telemetry
# Set INSFORGE_TELEMETRY_DISABLED=1 to disable anonymous self-host telemetry.
INSFORGE_TELEMETRY_DISABLED=
# Stripe Payments Configuration (Optional)
# Get your secret keys from https://dashboard.stripe.com/apikeys
STRIPE_LIVE_SECRET_KEY=
STRIPE_TEST_SECRET_KEY=
# Deployment Configuration (Optional)
# Required for self-hosted site deployments and custom domains.
VERCEL_TOKEN=
VERCEL_TEAM_ID=
VERCEL_PROJECT_ID=
# OAuth Configuration (Optional)
# Google OAuth - Get credentials from https://console.cloud.google.com/
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
# GitHub OAuth - Get credentials from https://github.com/settings/developers
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
#Microsoft OAuth - Get credentials from https://portal.azure.com/
MICROSOFT_CLIENT_ID=
MICROSOFT_CLIENT_SECRET=
# Discord OAuth - Get credentials from https://discord.com/developers/applications
DISCORD_CLIENT_ID=
DISCORD_CLIENT_SECRET=
# LinkedIn OAuth - Get credentials from https://www.linkedin.com/developers/apps
LINKEDIN_CLIENT_ID=
LINKEDIN_CLIENT_SECRET=
# X OAuth - Get credentials from https://developer.twitter.com/en/portal/dashboard
X_CLIENT_ID=
X_CLIENT_SECRET=
# Apple OAuth - Get credentials from https://developer.apple.com/account/resources/identifiers/list
# APPLE_CLIENT_ID is your Services ID (e.g., com.yourapp.service)
# APPLE_CLIENT_SECRET must be a JSON string with teamId, keyId, and privateKey (PKCS#8 PEM format from .p8 file)
APPLE_CLIENT_ID=
APPLE_CLIENT_SECRET=
+167
View File
@@ -0,0 +1,167 @@
services:
postgres:
image: ghcr.io/insforge/postgres-all:latest
environment:
- POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres}
- POSTGRES_DB=${POSTGRES_DB:-insforge}
- ENCRYPTION_KEY=${ENCRYPTION_KEY:-${JWT_SECRET:-dev-secret-please-change-in-production}}
volumes:
- postgres-data:/var/lib/postgresql/data
ports:
- "${POSTGRES_PORT:-5432}:5432"
networks:
- insforge-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
postgrest:
image: postgrest/postgrest:v12.2.12
restart: unless-stopped
environment:
PGRST_DB_URI: postgres://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@postgres:5432/${POSTGRES_DB:-insforge}
PGRST_OPENAPI_SERVER_PROXY_URI: http://localhost:3000
PGRST_DB_SCHEMA: public
PGRST_DB_ANON_ROLE: anon
PGRST_JWT_SECRET: ${JWT_SECRET:-dev-secret-please-change-in-production}
# Enable schema reloading via NOTIFY
PGRST_DB_CHANNEL_ENABLED: true
PGRST_DB_CHANNEL: pgrst
ports:
- "${POSTGREST_PORT:-5430}:3000"
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "bash -c '</dev/tcp/localhost/3000'"]
interval: 5s
timeout: 5s
retries: 5
start_period: 10s
networks:
- insforge-network
insforge:
image: ghcr.io/insforge/insforge-oss:v1.5.0
working_dir: /app
depends_on:
postgres:
condition: service_healthy
postgrest:
condition: service_healthy
ports:
- "${APP_PORT:-7130}:7130"
- "${AUTH_PORT:-7131}:7131"
environment:
- PORT=7130
- PROJECT_ROOT=/app
- API_BASE_URL=${API_BASE_URL:-}
- VITE_API_BASE_URL=${VITE_API_BASE_URL:-}
- JWT_SECRET=${JWT_SECRET:-dev-secret-please-change-in-production}
- ENCRYPTION_KEY=${ENCRYPTION_KEY:-${JWT_SECRET:-dev-secret-please-change-in-production}}
- ROOT_ADMIN_USERNAME=${ROOT_ADMIN_USERNAME:-${ADMIN_EMAIL:-admin}}
- ROOT_ADMIN_PASSWORD=${ROOT_ADMIN_PASSWORD:-${ADMIN_PASSWORD:-change-this-password}}
- ADMIN_EMAIL=${ROOT_ADMIN_USERNAME:-${ADMIN_EMAIL:-admin}}
- ADMIN_PASSWORD=${ROOT_ADMIN_PASSWORD:-${ADMIN_PASSWORD:-change-this-password}}
# PostgreSQL connection
- POSTGRES_HOST=postgres
- POSTGRES_PORT=5432
- POSTGRES_DB=${POSTGRES_DB:-insforge}
- POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres}
- DATABASE_URL=postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@postgres:5432/${POSTGRES_DB:-insforge}
- POSTGREST_BASE_URL=http://postgrest:3000
# LLM Model API keys
- OPENROUTER_API_KEY=${OPENROUTER_API_KEY:-}
# Stripe Payments Configuration
- STRIPE_TEST_SECRET_KEY=${STRIPE_TEST_SECRET_KEY:-}
- STRIPE_LIVE_SECRET_KEY=${STRIPE_LIVE_SECRET_KEY:-}
# Deployment Configuration
- VERCEL_TOKEN=${VERCEL_TOKEN:-}
- VERCEL_TEAM_ID=${VERCEL_TEAM_ID:-}
- VERCEL_PROJECT_ID=${VERCEL_PROJECT_ID:-}
# OAuth Configuration
- GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID:-}
- GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET:-}
- GITHUB_CLIENT_ID=${GITHUB_CLIENT_ID:-}
- GITHUB_CLIENT_SECRET=${GITHUB_CLIENT_SECRET:-}
- DISCORD_CLIENT_ID=${DISCORD_CLIENT_ID:-}
- DISCORD_CLIENT_SECRET=${DISCORD_CLIENT_SECRET:-}
- MICROSOFT_CLIENT_ID=${MICROSOFT_CLIENT_ID:-}
- MICROSOFT_CLIENT_SECRET=${MICROSOFT_CLIENT_SECRET:-}
- LINKEDIN_CLIENT_ID=${LINKEDIN_CLIENT_ID:-}
- LINKEDIN_CLIENT_SECRET=${LINKEDIN_CLIENT_SECRET:-}
- X_CLIENT_ID=${X_CLIENT_ID:-}
- X_CLIENT_SECRET=${X_CLIENT_SECRET:-}
- APPLE_CLIENT_ID=${APPLE_CLIENT_ID:-}
- APPLE_CLIENT_SECRET=${APPLE_CLIENT_SECRET:-}
# Logs directory
- LOGS_DIR=/insforge-logs
# Anonymous telemetry (set INSFORGE_TELEMETRY_DISABLED=1 to opt out)
- INSFORGE_TELEMETRY_DISABLED=${INSFORGE_TELEMETRY_DISABLED:-}
# Storage directory (for local file storage when S3 is not configured)
- STORAGE_DIR=/insforge-storage
restart: unless-stopped
volumes:
- storage-data:/insforge-storage
- insforge-logs:/insforge-logs
networks:
- insforge-network
# Deno serverless runtime for edge functions
deno:
image: ghcr.io/insforge/deno-runtime:latest
working_dir: /app
depends_on:
- postgres
- postgrest
ports:
- "${DENO_PORT:-7133}:7133"
environment:
- PORT=7133
- DENO_ENV=development
- DENO_DIR=/deno-dir
# PostgreSQL connection
- POSTGRES_HOST=postgres
- POSTGRES_PORT=5432
- POSTGRES_DB=${POSTGRES_DB:-insforge}
- POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres}
- POSTGREST_BASE_URL=http://postgrest:3000
# Worker timeout (60 seconds default)
- WORKER_TIMEOUT_MS=${WORKER_TIMEOUT_MS:-60000}
# Encryption keys for decrypting function secrets
- ENCRYPTION_KEY=${ENCRYPTION_KEY:-${JWT_SECRET:-dev-secret-please-change-in-production}}
- JWT_SECRET=${JWT_SECRET:-dev-secret-please-change-in-production}
volumes:
- deno_cache:/deno-dir
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://127.0.0.1:7133/health"]
interval: 10s
timeout: 5s
retries: 5
start_period: 15s
restart: unless-stopped
networks:
- insforge-network
volumes:
postgres-data:
driver: local
deno_cache:
driver: local
storage-data:
driver: local
insforge-logs:
driver: local
networks:
insforge-network:
driver: bridge