docker: fix data persistence with TINYWEB_DATA_DIR env var
This commit is contained in:
parent
af6ad6d391
commit
71c1175df8
4 changed files with 4 additions and 5 deletions
2
db.py
2
db.py
|
|
@ -6,7 +6,7 @@ import os
|
|||
from urllib.parse import urlparse, urljoin, parse_qs, urlencode, urlunparse, quote
|
||||
from bs4 import BeautifulSoup
|
||||
|
||||
DATA_DIR = os.path.expanduser("~/.tinyweb")
|
||||
DATA_DIR = os.environ.get("TINYWEB_DATA_DIR") or os.path.expanduser("~/.tinyweb")
|
||||
DATABASE = os.path.join(DATA_DIR, "index.db")
|
||||
|
||||
BLOCKED_NETWORKS = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue