diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 4ab9a3d..0dc5e09 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,3 +1,4 @@ +--- # To get started with Dependabot version updates, you'll need to specify which # package ecosystems to update and where the package manifests are located. # Please see the documentation for all configuration options: diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 011b881..f05b797 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -1,3 +1,4 @@ +--- # This workflow uses actions that are not certified by GitHub. # They are provided by a third-party and are governed by # separate terms of service, privacy policy, and support @@ -5,7 +6,8 @@ # GitHub recommends pinning actions to a commit SHA. # To get a newer version, you will need to update the SHA. -# You can also reference a tag or branch, but the action may change without warning. +# You can also reference a tag or branch, +# but the action may change without warning. name: Create and publish a Docker image diff --git a/pgadmin-config-creator/Dockerfile b/pgadmin-config-creator/Dockerfile index f328f4d..0293dce 100644 --- a/pgadmin-config-creator/Dockerfile +++ b/pgadmin-config-creator/Dockerfile @@ -1,7 +1,6 @@ FROM python:3.8-alpine -RUN mkdir /app -RUN mkdir /config -ADD . /app +RUN mkdir -p /{app,config} +COPY . /app WORKDIR /app CMD ["python", "app.py"] HEALTHCHECK CMD test -f /config/servers.json || exit 1 \ No newline at end of file diff --git a/pgadmin-config-creator/app.py b/pgadmin-config-creator/app.py index 4fcf492..32b7d0f 100644 --- a/pgadmin-config-creator/app.py +++ b/pgadmin-config-creator/app.py @@ -4,12 +4,14 @@ import time with open('/config/servers.json', 'w') as f: print("created " + f.name) - template_string = '{"Servers": {"1": {"Name": "DavinciResolve", "Group": "Servers", "Port": 5432, "Username": "postgres", "Host": "postgres", "SSLMode": "prefer", "MaintenanceDB": "postgres"}}}' + template_string = ('{"Servers": {"1": {"Name": "DavinciResolve", ' + '"Group": "Servers", "Port": 5432, "Username": '' + '"postgres", "Host": "postgres", "SSLMode": "prefer", "MaintenanceDB": "postgres"}}}' + ) 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(data) json.dump(data, f, indent=2) # sleep until GHA Healthchecks are complete -time.sleep(125) - +time.sleep(125) \ No newline at end of file