forked from Fediversity/Fediversity
pass in dummy initialUser to trigger orchestration from the panel
This commit is contained in:
parent
8fbe59af55
commit
6275e8b2dc
1 changed files with 11 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
import os
|
import os
|
||||||
|
import json
|
||||||
|
|
||||||
from django.urls import reverse_lazy
|
from django.urls import reverse_lazy
|
||||||
import os
|
import os
|
||||||
|
@ -50,8 +51,17 @@ class ConfigurationForm(LoginRequiredMixin, FormView):
|
||||||
print("DEPLOYING:")
|
print("DEPLOYING:")
|
||||||
print(os.getenv("REPO_DIR"))
|
print(os.getenv("REPO_DIR"))
|
||||||
print(os.getenv("NIX_DIR"))
|
print(os.getenv("NIX_DIR"))
|
||||||
|
submission = obj.parsed_value.model_dump_json()
|
||||||
|
deployment = json.dumps(json.loads(submission) | {
|
||||||
|
"initialUser": {
|
||||||
|
"displayName": "Testy McTestface",
|
||||||
|
"username": "test",
|
||||||
|
"password": "testtest",
|
||||||
|
"email": "test@test.com",
|
||||||
|
},
|
||||||
|
})
|
||||||
env = {
|
env = {
|
||||||
"DEPLOYMENT": obj.parsed_value.model_dump_json(),
|
"DEPLOYMENT": deployment,
|
||||||
"PATH": f"{os.getenv("NIX_DIR")}/bin/",
|
"PATH": f"{os.getenv("NIX_DIR")}/bin/",
|
||||||
}
|
}
|
||||||
print(f"env: {env}")
|
print(f"env: {env}")
|
||||||
|
|
Loading…
Add table
Reference in a new issue