Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions ayon_server/config/ayonconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@ class AyonConfig(BaseModel):
description="Absolute path to the directory containing the addons.",
)

storage_dir: str = Field(
default="/storage",
description=(
"Path to the storage root. "
"Desktop installers and dependency packages are expected in its "
"'desktop' subdirectory."
Comment on lines +61 to +63
),
)

frontend_dir: str = Field(
default="/frontend",
description="Path to the directory containing the frontend files.",
Expand Down
4 changes: 2 additions & 2 deletions ayon_server/installer/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import os
from collections.abc import Generator

from ayon_server.config import ayonconfig
from ayon_server.exceptions import AyonException
from ayon_server.types import Platform
from ayon_server.utils.json import json_loads
Expand All @@ -13,8 +14,7 @@ def get_desktop_dir(*args: str, for_writing: bool = True) -> str:
args: path to the directory relative to the desktop directory
"""

# TODO: Make this configurable
root = "/storage/desktop"
root = os.path.join(ayonconfig.storage_dir, "desktop")
directory = os.path.join(root, *args)
if not os.path.isdir(directory):
if for_writing:
Expand Down
Loading