File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,19 +32,13 @@ services:
3232 restart : unless-stopped
3333 ports :
3434 - " 8000:8000"
35- environment :
36- # Database path inside the container
37- - DB_PATH=/app/data/whois_cache.db
3835 volumes :
39- # Data persistence (WHOIS cache)
40- - ./gptkit_data:/app/data
41- ` ` `
42-
43- ### Environment Variables
36+ # Data persistence (WHOIS cache stored in /app/data/whois_cache.db)
37+ - gptkit_data:/app/data
4438
45- | Variable | Description | Default |
46- |----------|-------------|--------|
47- | ` DB_PATH` | Path to the SQLite database file | `whois_cache.db` |
39+ volumes :
40+ gptkit_data :
41+ ` ` `
4842
4943## Development
5044
Original file line number Diff line number Diff line change 55import os
66
77class WhoisCache :
8- def __init__ (self , db_path : str = None ):
9- self .db_path = db_path or os .getenv ("DB_PATH" , "whois_cache.db" )
8+ def __init__ (self ):
9+ self .db_path = "data/whois_cache.db"
10+ os .makedirs (os .path .dirname (self .db_path ), exist_ok = True )
1011 self ._init_db ()
1112
1213 def _init_db (self ):
You can’t perform that action at this time.
0 commit comments