- Dockerfile: bake bgutil PO-token provider in script mode (no sidecar); 720p verified - main.py / cloud/metering.py: support BGUTIL_SCRIPT_PATH (script mode) alongside HTTP - docker-compose.cloud.yml: drop bgutil sidecar; .env.cloud.example documents script mode - docker-compose.e2e.local.yml: local FRONTEND_URL/ALLOWED_ORIGINS/VITE_API_URL for testing - AuthContext: new/non-entitled sign-ins land on pricing to start the trial - ProfileMenu: header account dropdown (email, account & billing, sign out) - MediaInput: "YouTube URL" → "Video URL" + supported-platforms info popover
57 lines
2.3 KiB
Text
57 lines
2.3 KiB
Text
# Cloud (paid / managed-keys) mode — env template for openshorts.app.
|
|
# Copy to .env and fill in. Only needed when running with docker-compose.cloud.yml.
|
|
# Self-hosters running plain BYOK do NOT need any of this.
|
|
|
|
BILLING_ENABLED=true
|
|
|
|
# Postgres (docker-compose.cloud.yml provisions the `db` service)
|
|
POSTGRES_PASSWORD=change-me
|
|
DATABASE_URL=postgresql+asyncpg://openshorts:change-me@db:5432/openshorts
|
|
|
|
# Auth
|
|
JWT_SECRET=generate-a-long-random-string
|
|
FRONTEND_URL=https://openshorts.app
|
|
ALLOWED_ORIGINS=https://openshorts.app
|
|
|
|
# Email — magic link + admin alerts, via SMTP (e.g. Namecheap Private Email).
|
|
# Quote the password if it contains $ or * so dotenv keeps it literal.
|
|
SMTP_HOST=mail.privateemail.com
|
|
SMTP_PORT=465
|
|
SMTP_USER=info@yourdomain.com
|
|
SMTP_PASSWORD='your-mailbox-password'
|
|
EMAIL_FROM=OpenShorts <info@yourdomain.com>
|
|
# Operational alerts (proxy out of credits / high failure rate) are emailed here.
|
|
ADMIN_EMAIL=you@example.com
|
|
|
|
# Google OAuth (optional; magic link works without it)
|
|
GOOGLE_CLIENT_ID=
|
|
GOOGLE_CLIENT_SECRET=
|
|
|
|
# Stripe (test keys shown; use live keys in production).
|
|
# Prices are resolved by lookup_key (starter_monthly, topup_60, ...) at runtime,
|
|
# so no price IDs are needed here. Create the prices with those lookup_keys.
|
|
STRIPE_SECRET_KEY=sk_test_...
|
|
STRIPE_WEBHOOK_SECRET=whsec_...
|
|
|
|
# Managed provider keys (server-owned; only handed to entitled paid users)
|
|
MANAGED_GEMINI_API_KEY=
|
|
MANAGED_UPLOAD_POST_API_KEY=
|
|
OPENSHORTS_LOGO_URL=https://openshorts.app/logo.png
|
|
|
|
# Residential proxy for YouTube downloads (avoids datacenter-IP bans on the
|
|
# hosted server). Recommended: DataImpulse (~$1/GB PAYG). Downloads are capped
|
|
# to 720p when this is set, to control bandwidth cost. Empty = direct download.
|
|
PROXY_URL=
|
|
|
|
# Cloudflare R2 (S3-compatible) — durable storage for users' generated videos.
|
|
# Create an R2 bucket + an "Object Read & Write" API token scoped to it.
|
|
R2_ENDPOINT=https://<account_id>.r2.cloudflarestorage.com
|
|
R2_BUCKET=openshorts-videos
|
|
R2_ACCESS_KEY_ID=
|
|
R2_SECRET_ACCESS_KEY=
|
|
|
|
# PO-token provider for 720p/1080p YouTube downloads.
|
|
# The bgutil provider is baked into the backend image in *script mode*
|
|
# (BGUTIL_SCRIPT_PATH is set inside the Dockerfile) — no sidecar, nothing to set here.
|
|
# Only if you run bgutil as an external HTTP service, point at it instead:
|
|
# BGUTIL_BASE_URL=http://bgutil:4416
|