diff --git a/src/atocore/config.py b/src/atocore/config.py index d4a9530..3b21a15 100644 --- a/src/atocore/config.py +++ b/src/atocore/config.py @@ -104,6 +104,21 @@ class Settings(BaseSettings): @property def resolved_project_registry_path(self) -> Path: + """Path to the project registry JSON file. + + If ``ATOCORE_PROJECT_REGISTRY_DIR`` env var is set, the registry + lives at ``/project-registry.json``. Otherwise falls + back to the configured ``project_registry_path`` field. + + This lets Docker deployments point at a mounted volume via env + var without the ephemeral in-image ``/app/config/`` getting + wiped on every rebuild. + """ + import os + + registry_dir = os.environ.get("ATOCORE_PROJECT_REGISTRY_DIR", "").strip() + if registry_dir: + return Path(registry_dir) / "project-registry.json" return self._resolve_path(self.project_registry_path) @property