Skip to content

Commit

Permalink
Pin a minimum package version of gx-it-proxy.
Browse files Browse the repository at this point in the history
  • Loading branch information
natefoo committed Mar 17, 2023
1 parent d547656 commit 54965cd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,9 @@ The following options in the ``gravity`` section of ``galaxy.yml`` can be used t
# Set to true to start gx-it-proxy
# enable: false
# gx-it-proxy version
# version: '>=0.0.5'
# Public-facing IP of the proxy
# ip: localhost
Expand Down
2 changes: 2 additions & 0 deletions gravity/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from pydantic import BaseModel, BaseSettings, Extra, Field, validator

DEFAULT_INSTANCE_NAME = "_default_"
GX_IT_PROXY_MIN_VERSION = "0.0.5"


def none_to_default(cls, v, field):
Expand Down Expand Up @@ -237,6 +238,7 @@ class ReportsSettings(BaseModel):

class GxItProxySettings(BaseModel):
enable: bool = Field(default=False, description="Set to true to start gx-it-proxy")
version: str = Field(default=f">={GX_IT_PROXY_MIN_VERSION}", description="gx-it-proxy version")
ip: str = Field(default="localhost", description="Public-facing IP of the proxy")
port: int = Field(default=4002, description="Public-facing port of the proxy")
sessions: str = Field(
Expand Down
2 changes: 1 addition & 1 deletion gravity/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ class GalaxyGxItProxyService(Service):
"reverse_proxy": "--reverseProxy",
"proxy_path_prefix": "--proxyPathPrefix {settings[proxy_path_prefix]}",
}
_command_template = "{virtualenv_bin}npx gx-it-proxy --ip {settings[ip]} --port {settings[port]}" \
_command_template = "{virtualenv_bin}npx gx-it-proxy@{settings[version]} --ip {settings[ip]} --port {settings[port]}" \
" --sessions {settings[sessions]} {command_arguments[verbose]}" \
" {command_arguments[forward_ip]} {command_arguments[forward_port]}" \
" {command_arguments[reverse_proxy]} {command_arguments[proxy_path_prefix]}"
Expand Down

0 comments on commit 54965cd

Please sign in to comment.