From 25ea46324fb2a1bc0b8c90c8246012909796e7b0 Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Thu, 18 Mar 2021 15:27:45 +0100 Subject: [PATCH] add changelog + rename OCIS_RUNTIME_HOSTNAME -> OCIS_RUNTIME_HOST --- .../unreleased/runtime-address-configurable.md | 17 +++++++++++++++++ ocis/pkg/command/kill.go | 2 +- ocis/pkg/command/list.go | 2 +- ocis/pkg/command/run.go | 2 +- 4 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 changelog/unreleased/runtime-address-configurable.md diff --git a/changelog/unreleased/runtime-address-configurable.md b/changelog/unreleased/runtime-address-configurable.md new file mode 100644 index 000000000..16a2906b3 --- /dev/null +++ b/changelog/unreleased/runtime-address-configurable.md @@ -0,0 +1,17 @@ +Enhancement: Runtime Hostname and Port are now configurable + +Without any configuration the ocis runtime will start on `localhost:6060` unless specified otherwise. Usage: + +- `OCIS_RUNTIME_PORT=6061 bin/ocis server` + - overrides the oCIS runtime and starts on port 6061 +- `OCIS_RUNTIME_PORT=6061 bin/ocis list` + - lists running extensions for the runtime on `localhost:6061` + +All subcommands are updated and expected to work with the following environment variables: + +``` +OCIS_RUNTIME_HOST +OCIS_RUNTIME_PORT +``` + +https://github.com/owncloud/ocis/pull/1822 diff --git a/ocis/pkg/command/kill.go b/ocis/pkg/command/kill.go index 07c29edf5..3e09793ad 100644 --- a/ocis/pkg/command/kill.go +++ b/ocis/pkg/command/kill.go @@ -22,7 +22,7 @@ func KillCommand(cfg *config.Config) *cli.Command { &cli.StringFlag{ Name: "hostname", Value: "localhost", - EnvVars: []string{"OCIS_RUNTIME_HOSTNAME"}, + EnvVars: []string{"OCIS_RUNTIME_HOST"}, Destination: &cfg.Runtime.Host, }, &cli.StringFlag{ diff --git a/ocis/pkg/command/list.go b/ocis/pkg/command/list.go index cb91e0cf9..62fd0a8e4 100644 --- a/ocis/pkg/command/list.go +++ b/ocis/pkg/command/list.go @@ -21,7 +21,7 @@ func ListCommand(cfg *config.Config) *cli.Command { &cli.StringFlag{ Name: "hostname", Value: "localhost", - EnvVars: []string{"OCIS_RUNTIME_HOSTNAME"}, + EnvVars: []string{"OCIS_RUNTIME_HOST"}, Destination: &cfg.Runtime.Host, }, &cli.StringFlag{ diff --git a/ocis/pkg/command/run.go b/ocis/pkg/command/run.go index 07936a7cc..bf2d55a29 100644 --- a/ocis/pkg/command/run.go +++ b/ocis/pkg/command/run.go @@ -23,7 +23,7 @@ func RunCommand(cfg *config.Config) *cli.Command { &cli.StringFlag{ Name: "hostname", Value: "localhost", - EnvVars: []string{"OCIS_RUNTIME_HOSTNAME"}, + EnvVars: []string{"OCIS_RUNTIME_HOST"}, Destination: &cfg.Runtime.Host, }, &cli.StringFlag{