feat: complete dockerization architecture with data/logs persistence and prod export script v1.3.0

This commit is contained in:
Daniel Bedeleanu
2026-04-11 12:32:06 +03:00
parent c71a815792
commit 2e5ce8d153
15 changed files with 485 additions and 23 deletions

View File

@@ -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)