Skip to content

Commit 717b59a

Browse files
committed
docs: split env templates into .env.local.example and .env.production.example
Updated README and HOSTING to reference the new env template files.
1 parent ee8b32a commit 717b59a

4 files changed

Lines changed: 42 additions & 10 deletions

File tree

.env.example renamed to .env.local.example

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ NEXT_PUBLIC_API_URL=http://localhost:8000
1111

1212
# --- Backend Configuration ---
1313
FRONTEND_URL=http://localhost:3000
14-
GOOGLE_CLIENT_ID=...
15-
GOOGLE_CLIENT_SECRET=...
1614
JWT_SECRET_KEY=...
1715
SESSION_SECRET=...
1816
ENCRYPTION_KEY=...
@@ -23,3 +21,6 @@ MODAL_TOKEN_ID=ak-...
2321
MODAL_TOKEN_SECRET=as-...
2422
MODAL_APP_NAME=interpres-backend
2523
HF_TOKEN=hf_...
24+
# For Google OAuth
25+
GOOGLE_CLIENT_ID=...
26+
GOOGLE_CLIENT_SECRET=...

.env.production.example

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# --- Database Configuration ---
2+
DATABASE_URL=postgresql://interpres:interpres_secret@postgres:5432/interpres
3+
LANCEDB_PATH=gs://...
4+
UPLOADS_PATH=/uploads # For temporary saving uploaded documents
5+
6+
7+
# --- Frontend Configuration ---
8+
NEXT_PUBLIC_API_URL=http://localhost:8000
9+
10+
11+
# --- Backend Configuration ---
12+
FRONTEND_URL=http://localhost:3000
13+
JWT_SECRET_KEY=...
14+
SESSION_SECRET=...
15+
ENCRYPTION_KEY=...
16+
17+
18+
# --- Third Party Services ---
19+
MODAL_TOKEN_ID=ak-...
20+
MODAL_TOKEN_SECRET=as-...
21+
MODAL_APP_NAME=interpres-backend
22+
HF_TOKEN=hf_...
23+
# For Google OAuth
24+
GOOGLE_CLIENT_ID=...
25+
GOOGLE_CLIENT_SECRET=...
26+
# For Google Cloud Service
27+
GOOGLE_APPLICATION_CREDENTIALS_JSON=...
28+
# For Vercel Blob Storage
29+
BLOB_READ_WRITE_TOKEN=...

HOSTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Hosting: Local vs. Production
22

3-
This document outlines the architectural and configuration differences when running Interpres in a local development environment versus deploying it to a production environment (such as Railway or Vercel).
3+
This document outlines the architectural and configuration differences when running Interpres in a local development environment versus deploying it to a production environment (such as Railway or Vercel). See `.env.local.example` and `.env.production.example` for the corresponding environment variable templates.
44

55
## 1. Vector Database (LanceDB)
66

@@ -51,7 +51,7 @@ Transcribed manuscript images need to be stored and served to the frontend.
5151

5252
## 4. Environment Variables Checklist
5353

54-
When moving from local to production, ensure the following variables are updated:
54+
When moving from local to production, copy `.env.production.example` and update the following variables:
5555

5656
| Variable | Local Example | Production Example |
5757
| -------- | ------------- | ------------------ |

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -173,36 +173,37 @@ cd Interpres
173173

174174
### Step 2: Configure Environment Variables
175175

176-
Copy the example environment file and fill in your credentials:
176+
Copy the local development environment template and fill in your credentials:
177177

178178
```bash
179-
cp .env.example .env
179+
cp .env.local.example .env
180180
```
181181

182182
Edit `.env` and set the following values:
183183

184184
```dotenv
185185
# --- Database Configuration ---
186186
DATABASE_URL=postgresql://interpres:interpres_secret@postgres:5432/interpres
187+
LANCEDB_DOWNLOAD_URL=https://drive.google.com/file/d/1vCbxUqTRUVlo0gYJjgZDfWx-P9YF2JZ1/view?usp=share_link
187188
LANCEDB_PATH=/lancedb
188189
UPLOADS_PATH=/uploads
189190
190191
# --- Frontend Configuration ---
191192
NEXT_PUBLIC_API_URL=http://localhost:8000
192193
193194
# --- Backend Configuration ---
194-
GOOGLE_CLIENT_ID=<your-google-client-id>
195-
GOOGLE_CLIENT_SECRET=<your-google-client-secret>
196195
FRONTEND_URL=http://localhost:3000
197-
SESSION_SECRET=<generate-a-random-string>
198196
JWT_SECRET_KEY=<generate-a-random-string>
197+
SESSION_SECRET=<generate-a-random-string>
199198
ENCRYPTION_KEY=<generate-a-fernet-key>
200199
201200
# --- Third Party Services ---
202201
MODAL_TOKEN_ID=ak-...
203202
MODAL_TOKEN_SECRET=as-...
204203
MODAL_APP_NAME=interpres-backend
205204
HF_TOKEN=hf_...
205+
GOOGLE_CLIENT_ID=<your-google-client-id>
206+
GOOGLE_CLIENT_SECRET=<your-google-client-secret>
206207
```
207208

208209
To generate the required keys:
@@ -407,7 +408,8 @@ Interpres/
407408
|-- uv.lock # Locked Python dependencies
408409
|-- railway.json # Railway deployment config
409410
|-- deploy_modal.sh # Script to deploy ML services to Modal
410-
|-- .env.example # Template for environment variables
411+
|-- .env.local.example # Local development env template
412+
|-- .env.production.example # Production env template
411413
|-- HOSTING.md # Local vs production environment guide
412414
|
413415
|-- docs/

0 commit comments

Comments
 (0)