Skip to content

Commit 5d79ce4

Browse files
authored
hotfix(cli): add cli config for supertkns (#481)
1 parent b280ac2 commit 5d79ce4

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

cli/app/commands/install/run.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
SSH_FILE_PATH,
3030
SSH_KEY_SIZE,
3131
SSH_KEY_TYPE,
32+
SUPERTOKENS_API_PORT,
3233
VIEW_ENV_FILE,
3334
VIEW_PORT,
3435
Config,
@@ -82,7 +83,7 @@
8283
"view_port": _config.get_yaml_value(VIEW_PORT),
8384
"api_port": _config.get_yaml_value(API_PORT),
8485
"docker_port": _config.get_yaml_value(DOCKER_PORT),
85-
"supertokens_api_port": 3567,
86+
"supertokens_api_port": _config.get_yaml_value(SUPERTOKENS_API_PORT),
8687
}
8788

8889

@@ -425,7 +426,7 @@ def _update_environment_variables(self, env_values: dict) -> dict:
425426
view_host = self.view_domain if secure else f"{host_ip}:{self._get_config('view_port')}"
426427
protocol = "https" if secure else "http"
427428
ws_protocol = "wss" if secure else "ws"
428-
super_tokens_api_port = self._get_config("services.api.env.SUPERTOKENS_API_PORT") or 3567
429+
supertokens_api_port = self._get_config("supertokens_api_port") or 3567
429430
key_map = {
430431
"ALLOWED_ORIGIN": f"{protocol}://{view_host}",
431432
"SSH_HOST": host_ip,
@@ -438,7 +439,7 @@ def _update_environment_variables(self, env_values: dict) -> dict:
438439
"SUPERTOKENS_API_KEY": "NixopusSuperTokensAPIKey",
439440
"SUPERTOKENS_API_DOMAIN": f"{protocol}://{api_host}/api",
440441
"SUPERTOKENS_WEBSITE_DOMAIN": f"{protocol}://{view_host}",
441-
"SUPERTOKENS_CONNECTION_URI": f"{protocol}://{api_host}:{super_tokens_api_port}/api",
442+
"SUPERTOKENS_CONNECTION_URI": f"{protocol}://{api_host}:{supertokens_api_port}/api",
442443
}
443444

444445
for key, value in key_map.items():

cli/app/utils/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,3 +150,4 @@ def replacer(match):
150150
API_PORT = "services.api.env.PORT"
151151
CADDY_CONFIG_VOLUME = "services.caddy.env.CADDY_CONFIG_VOLUME"
152152
DOCKER_PORT = "services.api.env.DOCKER_PORT"
153+
SUPERTOKENS_API_PORT = "services.api.env.SUPERTOKENS_API_PORT"

cli/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "nixopus"
3-
version = "0.1.6"
3+
version = "0.1.7"
44
description = "A CLI for Nixopus"
55
authors = ["Nixopus <[email protected]>"]
66
readme = "README.md"

0 commit comments

Comments
 (0)