Skip to content

Commit

Permalink
added support for overriding default ports (#178)
Browse files Browse the repository at this point in the history
* added support for overriding default ports

* Update src/viur_cli/local.py

Co-authored-by: Sven Eberth <[email protected]>

* Apply suggestions from code review

Co-authored-by: Sven Eberth <[email protected]>

* Update src/viur_cli/local.py

Co-authored-by: Sven Eberth <[email protected]>

---------

Co-authored-by: Sven Eberth <[email protected]>
  • Loading branch information
Grashalmbeisser and sveneberth authored Nov 8, 2024
1 parent db3de2d commit 06f1dc6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/viur_cli/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,13 @@ def run(profile, additional_args):
f"Please install the 'gcloud' tool or Log in with an appropriate account.")

conf = config.get_profile(profile)
additional_args = list(additional_args)

if appyaml := conf.get("appyaml"):
additional_args = [f"--appyaml={appyaml}", *additional_args]

if conf.get("port"):
additional_args.append(f"--port={conf['port']}")
if conf.get("gunicorn_port"):
additional_args.append(f"--gunicorn_port={conf['gunicorn_port']}")

utils.system(
f'app_server -A={conf["application_name"]} {conf["distribution_folder"]} {" ".join(additional_args)}')

Expand Down

0 comments on commit 06f1dc6

Please sign in to comment.