Fix linting

This commit is contained in:
Elliot Matson 2022-07-29 23:47:06 -05:00
parent 52802f754b
commit a9bd241663
4 changed files with 12 additions and 8 deletions

View File

@ -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:

View File

@ -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

View File

@ -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

View File

@ -4,7 +4,10 @@ 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")
print("printing json to file...")
@ -12,4 +15,3 @@ with open('/config/servers.json', 'w') as f:
json.dump(data, f, indent=2)
# sleep until GHA Healthchecks are complete
time.sleep(125)