settings: $STATE_DIRECTORY is not useful
Packages on "real servers" will set it in package params.
This commit is contained in:
parent
2301cb2191
commit
95c67fc575
@ -1,5 +1,5 @@
|
||||
from pathlib import Path
|
||||
from os import environ, path
|
||||
from os import environ
|
||||
|
||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
@ -10,9 +10,6 @@ _STATIC_ROOT = environ.get('E11SYNC_STATIC_ROOT', '/tmp/e11sync-static')
|
||||
_GEOIP_PATH = environ.get('GEOIP_PATH')
|
||||
if db := environ.get('E11SYNC_DATABASE_PATH'):
|
||||
_DATABASE_PATH = db
|
||||
else:
|
||||
if statedir := environ.get('STATE_DIRECTORY'):
|
||||
_DATABASE_PATH = path.join(statedir, 'db.sqlite3')
|
||||
else:
|
||||
_DATABASE_PATH = BASE_DIR / 'db.sqlite3'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user