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 8214f241fa
commit 1d40f996ab
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():