Skip to content

Commit

Permalink
line length
Browse files Browse the repository at this point in the history
  • Loading branch information
hillalex committed May 30, 2023
1 parent 38fe26c commit f0b5047
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions orderly_web/constellation.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ def packit_db_container(cfg):
def packit_db_configure(container, cfg):
docker_util.exec_safely(container, ["wait-for-db"])
docker_util.exec_safely(container,
["psql", "-U", "packituser", "-d", "packit", "-a", "-f", "/packit-schema/schema.sql"])
["psql", "-U", "packituser", "-d",
"packit", "-a", "-f",
"/packit-schema/schema.sql"])


def packit_api_container(cfg):
Expand All @@ -86,9 +88,10 @@ def packit_api_configure(container, cfg):
print("[web] Configuring Packit API container")
outpack_container = cfg.containers["outpack-server"]
packit_db_container = cfg.containers["packit-db"]
url = "jdbc:postgresql://{}-{}:5432/packit?stringtype=unspecified"
opts = {
"db.url": "jdbc:postgresql://{}-{}:5432/packit?stringtype=unspecified".format(cfg.container_prefix,
packit_db_container),
"db.url": url.format(cfg.container_prefix,
packit_db_container),
"db.user": "packituser",
"db.password": "changeme",
"outpack.server.url": "http://{}-{}:8000".format(cfg.container_prefix,
Expand Down Expand Up @@ -354,15 +357,16 @@ def proxy_container(cfg, web, packit_api=None, packit=None):
else:
# this is a bit hacky, but if Packit not available, just pass
# the OW address. this will just result in all proxy routes
# being mapped to OW and is easier than writing conditional logic
# in the nginx proxy scripts
# being mapped to OW and is easier than writing conditional
# logic in the nginx proxy scripts
packit_api_addr = web_addr
if packit is not None:
packit_addr = packit.name_external(cfg.container_prefix)
else:
packit_addr = web_addr
proxy_args = [cfg.proxy_hostname, str(cfg.proxy_port_http),
str(cfg.proxy_port_https), web_addr, packit_api_addr, packit_addr]
str(cfg.proxy_port_https), web_addr, packit_api_addr,
packit_addr]
proxy_mounts = [constellation.ConstellationMount(
"proxy_logs", "/var/log/nginx")]
proxy_ports = [cfg.proxy_port_http, cfg.proxy_port_https]
Expand Down

0 comments on commit f0b5047

Please sign in to comment.