feat: complete dockerization architecture with data/logs persistence and prod export script v1.3.0
This commit is contained in:
@@ -4,9 +4,11 @@ import os
|
||||
|
||||
# Get absolute path for the backend directory
|
||||
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
DATA_DIR = os.path.join(BASE_DIR, "data")
|
||||
|
||||
# Create data directory if it doesn't exist in the backend folder
|
||||
# Use DATA_DIR from environment if running in Docker, otherwise fallback to local 'data' folder
|
||||
DATA_DIR = os.environ.get("DATA_DIR", os.path.join(BASE_DIR, "data"))
|
||||
|
||||
# Create data directory if it doesn't exist
|
||||
os.makedirs(DATA_DIR, exist_ok=True)
|
||||
|
||||
# Handle absolute path for SQLite (needs 4 slashes on Unix)
|
||||
|
||||
Reference in New Issue
Block a user