Recently Written · git

subplz-web

git clone https://github.com/equwal/subplz-web

Log | Files | Refs


.env.example (5319 bytes)

1 # Copy to .env and edit. Every value has a working localhost default,
2 # so an empty .env is a valid config.
3 
4 # --- alignment -------------------------------------------------------------
5 # Which backend does the aligning. See backend/aligner.py to add another.
6 SUBPLZ_WEB_ALIGNER=subplz
7 # tiny is what upstream recommends for audiobooks: the transcript only needs to
8 # be good enough to line up against text you already have.
9 SUBPLZ_WEB_MODEL=tiny
10 # cpu | cuda
11 SUBPLZ_WEB_DEVICE=cpu
12 # 0 = use (CPU count - 1)
13 SUBPLZ_WEB_THREADS=0
14 SUBPLZ_WEB_JOB_TIMEOUT_SECONDS=21600
15 
16 # --- match check -----------------------------------------------------------
17 # Transcribe a few short samples on upload and score them against the book,
18 # so a mismatched pair is caught in seconds instead of after a full run.
19 SUBPLZ_WEB_MATCH_CHECK=true
20 
21 # --- video -----------------------------------------------------------------
22 # Render a YouTube-ready MP4: cover image + audio + soft subtitle track.
23 SUBPLZ_WEB_RENDER_VIDEO=true
24 SUBPLZ_WEB_VIDEO_WIDTH=1920
25 SUBPLZ_WEB_VIDEO_HEIGHT=1080
26 # 1 fps is the minimum YouTube accepts and all a still image needs.
27 SUBPLZ_WEB_VIDEO_FPS=1
28 # "auto" probes the H.264 encoders this ffmpeg build can actually run.
29 # Force one with libx264 / h264_nvenc / h264_amf / h264_qsv / libopenh264.
30 SUBPLZ_WEB_VIDEO_ENCODER=auto
31 SUBPLZ_WEB_VIDEO_CRF=28
32 
33 # --- queue -----------------------------------------------------------------
34 # memory = run jobs in this process. redis = hand them to worker.py processes.
35 SUBPLZ_WEB_QUEUE_BACKEND=memory
36 SUBPLZ_WEB_MAX_CONCURRENT_JOBS=1
37 # SUBPLZ_WEB_REDIS_URL=redis://localhost:6379/0
38 
39 # --- storage ---------------------------------------------------------------
40 # local = under ./data. s3 = a bucket, with presigned download URLs.
41 SUBPLZ_WEB_STORAGE_BACKEND=local
42 # SUBPLZ_WEB_S3_BUCKET=subplz-artifacts
43 # SUBPLZ_WEB_S3_PREFIX=jobs/
44 # SUBPLZ_WEB_DOWNLOAD_URL_TTL_SECONDS=3600
45 
46 # --- database --------------------------------------------------------------
47 # Empty = SQLite under ./data. Set a Postgres URL for the public release.
48 # SUBPLZ_WEB_DATABASE_URL=postgresql+psycopg://user:pass@host/subplz
49 
50 # --- billing ---------------------------------------------------------------
51 # Off for localhost: nothing is locked and nothing is for sale.
52 # On: a conversion in the visitor's browser stays free, without limit. A
53 # conversion on this server's hardware takes one credit.
54 SUBPLZ_WEB_BILLING_ENABLED=false
55 # True when fast conversion on this server's hardware is on offer. While it is
56 # false the page sells nothing, whatever BILLING_ENABLED says.
57 SUBPLZ_WEB_CLOUD_ENABLED=false
58 # Free credits for conversions on this server, while CLOUD_ENABLED is true.
59 # A visitor without a verified email gets FREE_CREDITS_ANONYMOUS. An account
60 # with a verified email gets FREE_CREDITS_VERIFIED in all, one more each day
61 # (DAILY_FREE_CREDIT, not carried over), and one more for every
62 # BOOKS_PER_BONUS_CREDIT books that the server converted for it (0 = off).
63 SUBPLZ_WEB_FREE_CREDITS_ANONYMOUS=1
64 SUBPLZ_WEB_FREE_CREDITS_VERIFIED=2
65 SUBPLZ_WEB_DAILY_FREE_CREDIT=true
66 SUBPLZ_WEB_BOOKS_PER_BONUS_CREDIT=2
67 # Where customers write to. Shown on /terms.html.
68 SUBPLZ_WEB_CONTACT_EMAIL=
69 
70 # --- accounts & payments ---------------------------------------------------
71 # The origin users reach this on. Sign-in links and Stripe return URLs use it.
72 # SUBPLZ_WEB_PUBLIC_BASE_URL=https://subread.space
73 # Send the identity cookie over HTTPS only. Set true on any public deployment.
74 # SUBPLZ_WEB_COOKIE_SECURE=true
75 # Shown on the Stripe payment page.
76 # SUBPLZ_WEB_SITE_NAME=SubRead
77 
78 # Stripe. Do not type these into a shell - use tools/set-secret.sh, which
79 # prompts with input hidden and keeps them out of your history.
80 # SUBPLZ_WEB_STRIPE_SECRET_KEY=
81 # SUBPLZ_WEB_STRIPE_WEBHOOK_SECRET=
82 
83 # Sign-in links go out over SMTP, so any provider works. With no host set,
84 # sign-in is unavailable: there would be no safe way to deliver the link.
85 # SUBPLZ_WEB_SMTP_HOST=smtp.example.com
86 # SUBPLZ_WEB_SMTP_PORT=587
87 # SUBPLZ_WEB_SMTP_USER=
88 # SUBPLZ_WEB_SMTP_PASSWORD=
89 # SUBPLZ_WEB_SMTP_FROM=SubRead <login@subread.space>
90 # Development only: return the sign-in link in the API response instead of
91 # mailing it. This signs anyone in as any address - never set it in public.
92 # SUBPLZ_WEB_DEV_LOGIN_LINKS=true
93 # Override the plan catalogue (see backend/pricing.py for the shape).
94 # SUBPLZ_WEB_PLANS_JSON=[...]
95 
96 # --- Subrep Pro --------------------------------------------------------------
97 # The key that signs the licences of the Subrep desktop app. Do not type it:
98 # make it on the server with tools/subrep_key.py, which also prints the public
99 # key for the desktop build. Without it, Subrep Pro is not for sale.
100 # SUBPLZ_WEB_SUBREP_LICENSE_KEY=
101 
102 # --- Google Play (Subrep Play build) ------------------------------------------
103 # The path of the JSON key of a service account that can read and consume the
104 # orders of Subrep in Play Console. Keep the file outside the checkout, owned by
105 # the service user, with mode 600. Do not put the key itself in this file.
106 # Without the file, the Play build of Subrep sells no hours.
107 # SUBPLZ_WEB_PLAY_SERVICE_ACCOUNT_FILE=/etc/subplz-web/play-service-account.json
108 
109 # --- uploads ---------------------------------------------------------------
110 SUBPLZ_WEB_MAX_UPLOAD_BYTES=2147483648