feat(tubesync): add tubesync application and module

This commit is contained in:
514fpv 2024-02-21 23:25:06 +08:00
parent f2f2b34e80
commit 728cf4ad3b
Signed by: koishi
SSH key fingerprint: SHA256:axz0uIzzY+5W19i7QOUuiw5LSqhKfCBKPf3L4xFRxLw
5 changed files with 356 additions and 0 deletions

View file

@ -0,0 +1,16 @@
diff --git a/tubesync/tubesync/local_settings.py.container b/tubesync/tubesync/local_settings.py.container
index a7a07ab..9207c7f 100644
--- a/tubesync/tubesync/local_settings.py.container
+++ b/tubesync/tubesync/local_settings.py.container
@@ -6,9 +6,8 @@ from common.utils import parse_database_connection_string
BASE_DIR = Path(__file__).resolve().parent.parent
-ROOT_DIR = Path('/')
-CONFIG_BASE_DIR = ROOT_DIR / 'config'
-DOWNLOADS_BASE_DIR = ROOT_DIR / 'downloads'
+CONFIG_BASE_DIR = Path(os.getenv('CONFIG_BASE_DIR', "/var/lib/tubesync"))
+DOWNLOADS_BASE_DIR = Path(os.getenv('DOWNLOADS_BASE_DIR', f"{CONFIG_BASE_DIR}/downloads"))
DJANGO_URL_PREFIX = os.getenv('DJANGO_URL_PREFIX', None)
STATIC_URL = str(os.getenv('DJANGO_STATIC_URL', '/static/'))
if DJANGO_URL_PREFIX and STATIC_URL: