add patch to fix failing "tenant_files" migration
The new migration in tenant_files.py references a MEDIA_ROOT directory based on its own path, which in our case is in the read-only /nix/store. We need it to refer to the actual authentik state directory instead, which defaults to /var/lib/authentik/media in module.nix
This commit is contained in:
parent
d85dacb6c2
commit
d060292aa6
3 changed files with 22 additions and 3 deletions
15
components/authentik_media_tenant_files_miration.patch
Normal file
15
components/authentik_media_tenant_files_miration.patch
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
diff --git a/lifecycle/system_migrations/tenant_files.py b/lifecycle/system_migrations/tenant_files.py
|
||||
index 40795d460..7ac1efb34 100644
|
||||
--- a/lifecycle/system_migrations/tenant_files.py
|
||||
+++ b/lifecycle/system_migrations/tenant_files.py
|
||||
@@ -2,8 +2,9 @@
|
||||
from pathlib import Path
|
||||
|
||||
from lifecycle.migrate import BaseMigration
|
||||
+from authentik.lib.config import CONFIG
|
||||
|
||||
-MEDIA_ROOT = Path(__file__).parent.parent.parent / "media"
|
||||
+MEDIA_ROOT = Path(CONFIG.get("paths.media"))
|
||||
TENANT_MEDIA_ROOT = MEDIA_ROOT / "public"
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue