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

@@ -11,7 +11,7 @@ router = APIRouter(prefix="/users", tags=["users"])
pwd_context = CryptContext(schemes=["pbkdf2_sha256"], deprecated="auto")
def get_ldap_config():
config_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), "ldap_config.json")
config_path = os.path.join(database.DATA_DIR, "ldap_config.json")
if os.path.exists(config_path):
with open(config_path, "r") as f:
return json.load(f)
@@ -209,7 +209,7 @@ def get_ldap_settings():
@router.post("/ldap-config")
def update_ldap_settings(config: dict):
config_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), "ldap_config.json")
config_path = os.path.join(database.DATA_DIR, "ldap_config.json")
with open(config_path, "w") as f:
json.dump(config, f)
return {"message": "Config saved"}