Turbopack requires native SWC bindings unavailable on o2switch's old glibc, so force webpack for production builds. NODE_ENV=production on o2switch's shell also caused npm to skip devDependencies needed at build time (Tailwind, PostCSS), so deploy now installs with --include=dev. yt-dlp's standalone PyInstaller binary self-extracts to noexec /tmp and fails to mmap its bundled shared libs there, and o2switch's system python3 (3.6) is too old for the plain zipapp. Revert to the zipapp and invoke it explicitly through a configurable PYTHON_BIN, set to o2switch's newer Python 3.11 in .env.prod. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
16 lines
514 B
TypeScript
16 lines
514 B
TypeScript
import path from 'path'
|
|
|
|
export const config = {
|
|
DOWNLOAD_LINK_TTL_HOURS: 24,
|
|
WORKER_CONCURRENCY: 3,
|
|
WORKER_POLL_INTERVAL_MS: 10_000,
|
|
STORAGE_PATH: process.env.STORAGE_PATH ?? '',
|
|
RATE_LIMIT_MAX: 5,
|
|
RATE_LIMIT_WINDOW_MS: 3_600_000,
|
|
PROBE_RATE_LIMIT_MAX: 20,
|
|
PROBE_RATE_LIMIT_WINDOW_MS: 3_600_000,
|
|
PROBE_TIMEOUT_MS: 20_000,
|
|
BIN_DIR: process.env.BIN_DIR ?? path.join(process.cwd(), 'bin'),
|
|
PYTHON_BIN: process.env.PYTHON_BIN ?? (process.platform === 'win32' ? 'python' : 'python3'),
|
|
} as const
|