From 4ba2140b7b287e548d15ca66c2fe212906c8bcbb Mon Sep 17 00:00:00 2001 From: Elliot Matson <1711604+elliotmatson@users.noreply.github.com> Date: Sat, 30 Jul 2022 07:48:07 -0500 Subject: [PATCH] add clarifying comments --- pgadmin-config-creator/app.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pgadmin-config-creator/app.py b/pgadmin-config-creator/app.py index 9cd2048..757d995 100644 --- a/pgadmin-config-creator/app.py +++ b/pgadmin-config-creator/app.py @@ -2,17 +2,24 @@ import json import os import time +# open json file in docker volume with open("/config/servers.json", "w") as f: print("created " + f.name) + # template json string template_string = ( '{"Servers": {"1": {"Name": "DavinciResolve", ' '"Group": "Servers", "Port": 5432, "Username": ' '"postgres", "Host": "postgres", "SSLMode": "prefer", "MaintenanceDB": "postgres"}}}' ) data = json.loads(template_string) + # fix username data["Servers"]["1"]["Username"] = os.getenv("POSTGRES_USER") print("printing json to file...") print(data) + # update config file json.dump(data, f, indent=2) -# sleep until GHA Healthchecks are complete +# Sleep until GHA Healthchecks are complete. +# I'm sure there's a better way to get this to not +# stall a docker-compose up --wait, but I don't know +# what it is time.sleep(125)