Repository navigation
Expand file tree
/
Copy pathenv.vps-lambda.example
More file actions
109 lines (93 loc) · 3.48 KB
/
Copy pathenv.vps-lambda.example
File metadata and controls
109 lines (93 loc) · 3.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# ============================================================
# PRESET: VPS + Lambda Render
# ============================================================
# Queue: BullMQ + Redis (container)
# Storage: MinIO (container) lub zewnętrzny S3/B2/R2 (patrz niżej)
# Render: AWS Lambda (offload renderowania z VPS)
#
# Kiedy używać:
# - VPS ma mało RAM (1-2GB) i render Remotion za dużo zajmuje
# - Chcesz renderować równolegle wiele reeli bez blokowania serwera
# - Render trwa długo i worker timeout jest problemem
#
# Setup Lambda (jednorazowo):
# AWS_REGION=eu-central-1 npx tsx packages/remotion/scripts/deploy-lambda.ts
# -> skopiuj REMOTION_LAMBDA_FUNCTION_NAME i REMOTION_LAMBDA_SERVE_URL z outputu
#
# Uruchomienie:
# cp env.vps-lambda.example .env
# docker compose -f docker-compose.prod.yml up -d
# (reel-worker NIE jest potrzebny - render idzie na Lambda)
# ============================================================
# --- Required ---
AUTH_SECRET=change-me-at-least-32-characters-long
DATABASE_URL=postgresql://reelstack:CHANGE_ME@postgres:5432/reelstack # trufflehog:ignore
# --- Redis (BullMQ queue) ---
REDIS_URL=redis://:CHANGE_ME@redis:6379
REDIS_PASSWORD=CHANGE_ME
# --- Storage: wybierz jeden wariant ---
# Wariant A: MinIO (kontener lokalny)
MINIO_ENDPOINT=minio
MINIO_PORT=9000
MINIO_ACCESS_KEY=CHANGE_ME
MINIO_SECRET_KEY=CHANGE_ME_SECRET
MINIO_BUCKET=reelstack
MINIO_USE_SSL=false
# Wariant B: Backblaze B2 (bez kontenera MinIO, tańsze)
# MINIO_ENDPOINT=s3.us-west-004.backblazeb2.com # zmień region na swój
# MINIO_PORT=443
# MINIO_ACCESS_KEY=<B2 applicationKeyId>
# MINIO_SECRET_KEY=<B2 applicationKey>
# MINIO_BUCKET=reelstack
# MINIO_USE_SSL=true
# Wariant C: Cloudflare R2 (bez kontenera MinIO, 10GB free tier)
# MINIO_ENDPOINT=<account_id>.r2.cloudflarestorage.com
# MINIO_PORT=443
# MINIO_ACCESS_KEY=<R2 Access Key ID>
# MINIO_SECRET_KEY=<R2 Secret Access Key>
# MINIO_BUCKET=reelstack
# MINIO_USE_SSL=true
# Wariant D: AWS S3
# MINIO_ENDPOINT=s3.<region>.amazonaws.com # np. s3.eu-central-1.amazonaws.com
# MINIO_PORT=443
# MINIO_ACCESS_KEY=<AWS Access Key ID>
# MINIO_SECRET_KEY=<AWS Secret Access Key>
# MINIO_BUCKET=reelstack
# MINIO_USE_SSL=true
# --- PostgreSQL ---
POSTGRES_USER=reelstack
POSTGRES_PASSWORD=CHANGE_ME
POSTGRES_DB=reelstack
# --- Lambda Render ---
REMOTION_RENDERER=lambda
AWS_REGION=eu-central-1
AWS_ACCESS_KEY_ID=...
AWS_SECRET_ACCESS_KEY=...
REMOTION_LAMBDA_FUNCTION_NAME=remotion-render-... # z deploy-lambda.ts
REMOTION_LAMBDA_SERVE_URL=https://s3.eu-central-1.amazonaws.com/... # z deploy-lambda.ts
# --- AI Planner (wybierz jednego dostawcę, priorytet: Anthropic > OpenRouter > OpenAI) ---
# Model override (opcjonalny):
# Anthropic: claude-sonnet-4-6 (domyślny), claude-haiku-4-5-20251001 (tańszy)
# OpenRouter: anthropic/claude-sonnet-4-6 (domyślny), google/gemini-2.5-pro, openai/gpt-4o, etc.
# OpenAI: gpt-4o (domyślny), gpt-4o-mini (tańszy)
# PLANNER_MODEL=claude-sonnet-4-6
# Wariant A: Anthropic (najlepsze prompty, natywne API)
ANTHROPIC_API_KEY=sk-ant-...
# Wariant B: OpenRouter (dostęp do wielu modeli przez jeden klucz)
# OPENROUTER_API_KEY=sk-or-...
# PLANNER_MODEL=anthropic/claude-sonnet-4-6
# Wariant C: OpenAI
# OPENAI_API_KEY=sk-...
# --- TTS ---
# ELEVENLABS_API_KEY=...
# OPENAI_API_KEY=...
# --- AI Video Tools (optional) ---
# PEXELS_API_KEY=...
# HEYGEN_API_KEY=...
# VEO3_API_KEY=...
# VEO3_PROJECT_ID=...
# KLING_API_KEY=...
# SEEDANCE_API_KEY=...
# GEMINI_API_KEY=...
# --- App ---
NODE_ENV=production