-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
executable file
·126 lines (108 loc) · 5.41 KB
/
Copy path.env.example
File metadata and controls
executable file
·126 lines (108 loc) · 5.41 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# =============================================================================
# Application Configuration
# =============================================================================
APP_ENV=development
APP_DEBUG=true
APP_SECRET_KEY=your-secret-key-change-in-production-min-32-chars
APP_HOST=0.0.0.0
APP_PORT=8000
APP_WORKERS=4
# =============================================================================
# Database Configuration
# =============================================================================
DATABASE_URL=postgresql://gigapdf:gigapdf@localhost:5432/gigapdf
DATABASE_POOL_SIZE=20
# =============================================================================
# Redis Configuration
# =============================================================================
REDIS_URL=redis://localhost:6379/0
# =============================================================================
# Authentication (External JWT)
# =============================================================================
# Can be a PEM public key or JWKS URL
AUTH_JWT_PUBLIC_KEY=your-jwt-public-key-or-jwks-url
AUTH_JWT_ALGORITHM=RS256
AUTH_JWT_ISSUER=https://auth.example.com
AUTH_JWT_AUDIENCE=giga-pdf
# =============================================================================
# Storage Configuration
# =============================================================================
STORAGE_PATH=/var/lib/gigapdf/documents
STORAGE_MAX_SIZE_GB=100
# =============================================================================
# OCR Configuration (Tesseract)
# =============================================================================
TESSERACT_PATH=/usr/bin/tesseract
TESSERACT_DATA_PATH=/usr/share/tesseract-ocr/5/tessdata
OCR_DEFAULT_LANGUAGES=fra+eng
# =============================================================================
# PDF Engine (Next.js web — TypeScript)
# =============================================================================
# Embed custom fonts (original PDF fonts converted via fontforge, or fonts
# downloaded on demand from Google Fonts) into the final PDF when baking
# text edits. Disabled when unset. Requires `fontforge` on the host
# (already bundled in the Docker web image).
FONT_EMBED_CUSTOM_ENABLED=true
# Internal URL the Celery worker uses to reach the Next.js TS engine, plus the
# shared secret authenticating those server-to-server calls (e.g. the export
# worker calling /api/pdf/preview, which requires auth). INTERNAL_API_SECRET
# MUST be identical in the Python (.env) and Next.js environments — the same
# .env is symlinked for apps/web in production. Generate: openssl rand -hex 32
NEXTJS_INTERNAL_URL=http://localhost:3000
INTERNAL_API_SECRET=change-me-min-32-chars-use-openssl-rand-hex-32
# =============================================================================
# Celery Configuration
# =============================================================================
CELERY_BROKER_URL=redis://localhost:6379/1
CELERY_RESULT_BACKEND=db+postgresql://gigapdf:gigapdf@localhost:5432/gigapdf_celery
JOB_TIMEOUT_SECONDS=3600
ASYNC_THRESHOLD_MB=10
# =============================================================================
# Limits
# =============================================================================
MAX_UPLOAD_SIZE_MB=250
MAX_PAGES_PER_DOCUMENT=5000
PREVIEW_MAX_DPI=600
HISTORY_MAX_STATES=100
# =============================================================================
# WebSocket Configuration
# =============================================================================
SOCKETIO_MESSAGE_QUEUE=redis://localhost:6379/2
# =============================================================================
# Email Configuration (Resend)
# =============================================================================
# Transactional emails are sent through Resend (https://resend.com).
# Get an API key at https://resend.com/api-keys (server-only, never NEXT_PUBLIC_*).
RESEND_API_KEY=re_xxxxxxxxxxxxxxxxxxxxxxxx
# Verified sender. The domain of EMAIL_FROM MUST be verified in Resend.
EMAIL_FROM=noreply@giga-pdf.com
MAIL_FROM_NAME=GigaPDF
# Reply-To shown to recipients (support inbox).
EMAIL_REPLY_TO=support@giga-pdf.com
# Absolute production URLs used inside emails (logo + links). These must NOT
# point to localhost — NEXT_PUBLIC_APP_URL is inlined as localhost in bundles.
EMAIL_BASE_URL=https://giga-pdf.com
EMAIL_APP_URL=https://giga-pdf.com
# Frontend URL for email links (password reset, verification, etc.)
FRONTEND_URL=http://localhost:3000
# =============================================================================
# Stripe Configuration
# =============================================================================
# Get these from https://dashboard.stripe.com/apikeys
STRIPE_SECRET_KEY=sk_test_your_secret_key
STRIPE_PUBLISHABLE_KEY=pk_test_your_publishable_key
# Webhook secret from https://dashboard.stripe.com/webhooks
# Configure webhook URL: https://your-domain.com/webhooks/stripe
# Events to enable:
# - checkout.session.completed
# - customer.subscription.created
# - customer.subscription.updated
# - customer.subscription.deleted
# - customer.subscription.trial_will_end
# - invoice.paid
# - invoice.payment_failed
STRIPE_WEBHOOK_SECRET=whsec_your_webhook_secret
# NOTE: Price IDs are managed in the database (plans table)
# The billing queue automatically syncs plans to Stripe
# Run: celery -A app.tasks.celery_app worker -Q billing
# Products and prices will be created/updated automatically