File tree Expand file tree Collapse file tree 3 files changed +25
-4
lines changed
Expand file tree Collapse file tree 3 files changed +25
-4
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ uv run flask run
7777### Production Environment
7878
7979``` bash
80- uv run gunicorn main:app -b 0.0.0.0:5000
80+ uv run gunicorn -c gunicorn.conf main:app
8181```
8282
8383### Deploy to Vercel
Original file line number Diff line number Diff line change 1- [program:gunicorn]
2- command=/usr/local/bin/gunicorn main:app -b localhost:5000
3- directory=/app
1+ # Gunicorn configuration file
2+ import multiprocessing
3+
4+ # Bind to all interfaces on port 5000
5+ bind = "0.0.0.0:5000"
6+
7+ # Worker Options
8+ # Using 1 worker to maintain shared memory cache (SimpleCache) consistency
9+ workers = 1
10+ # Use threads for concurrency within the single worker
11+ threads = 4
12+
13+ # Timeout
14+ # Increased to 120 seconds to accommodate long-running scrapers (e.g., Economist)
15+ timeout = 120
16+
17+ # Logging
18+ accesslog = "-" # Log to stdout
19+ errorlog = "-" # Log to stderr
20+ loglevel = "info"
Original file line number Diff line number Diff line change 1+ import warnings
2+ # Suppress pkg_resources deprecation warning from Flask 2.0.2
3+ warnings .filterwarnings ("ignore" , category = UserWarning , module = "flask.cli" )
4+
15import os
26from dotenv import load_dotenv
37
You can’t perform that action at this time.
0 commit comments