3rd time's the charm
This commit is contained in:
parent
7d44729c6e
commit
c75fc233fe
@ -2,12 +2,13 @@ import json
|
|||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
|
|
||||||
with open('/config/servers.json', 'w') as f:
|
with open("/config/servers.json", "w") as f:
|
||||||
print("created " + f.name)
|
print("created " + f.name)
|
||||||
template_string = ('{"Servers": {"1": {"Name": "DavinciResolve", '
|
template_string = (
|
||||||
'"Group": "Servers", "Port": 5432, "Username": '
|
'{"Servers": {"1": {"Name": "DavinciResolve", '
|
||||||
'"postgres", "Host": "postgres", "SSLMode": "prefer", "MaintenanceDB": "postgres"}}}'
|
'"Group": "Servers", "Port": 5432, "Username": '
|
||||||
)
|
'"postgres", "Host": "postgres", "SSLMode": "prefer", "MaintenanceDB": "postgres"}}}'
|
||||||
|
)
|
||||||
data = json.loads(template_string)
|
data = json.loads(template_string)
|
||||||
data["Servers"]["1"]["Username"] = os.getenv("POSTGRES_USER")
|
data["Servers"]["1"]["Username"] = os.getenv("POSTGRES_USER")
|
||||||
print("printing json to file...")
|
print("printing json to file...")
|
||||||
|
Loading…
Reference in New Issue
Block a user