docker: fix data persistence with TINYWEB_DATA_DIR env var

This commit is contained in:
blankie 2026-06-14 07:48:34 +00:00
parent 27147bd3f9
commit 1461c62c91
4 changed files with 4 additions and 5 deletions

2
app.py
View file

@ -16,7 +16,7 @@ from gateway import GatewayState, GatewayHandler
IDENTITY_FILE = "tinyweb_identity"
DEFAULT_TRANSPORT_HOST = "rnode.bre.land"
DEFAULT_TRANSPORT_PORT = 4242
DATA_DIR = os.path.expanduser("~/.tinyweb")
DATA_DIR = os.environ.get("TINYWEB_DATA_DIR") or os.path.expanduser("~/.tinyweb")
def get_transport_config():