8282 "view_port" : _config .get_yaml_value (VIEW_PORT ),
8383 "api_port" : _config .get_yaml_value (API_PORT ),
8484 "docker_port" : _config .get_yaml_value (DOCKER_PORT ),
85+ "supertokens_api_port" : 3567 ,
8586}
8687
8788
@@ -114,7 +115,7 @@ def __init__(
114115 self .main_task = None
115116 self ._validate_domains ()
116117 self ._validate_repo ()
117-
118+
118119 # Log when using custom repository/branch and staging compose file
119120 if self ._is_custom_repo_or_branch ():
120121 if self .logger :
@@ -126,13 +127,13 @@ def _get_config(self, key: str):
126127 return self .repo
127128 if key == "branch_name" and self .branch is not None :
128129 return self .branch
129-
130+
130131 # Override compose_file_path to use docker-compose-staging.yml when custom repo/branch is provided
131132 if key == "compose_file_path" and self ._is_custom_repo_or_branch ():
132133 # Get the base directory and replace docker-compose.yml with docker-compose-staging.yml
133134 default_compose_path = _config .get_config_value (key , self ._user_config , DEFAULTS )
134135 return default_compose_path .replace ("docker-compose.yml" , "docker-compose-staging.yml" )
135-
136+
136137 try :
137138 return _config .get_config_value (key , self ._user_config , DEFAULTS )
138139 except ValueError :
@@ -163,11 +164,11 @@ def _is_custom_repo_or_branch(self):
163164 """Check if custom repository or branch is provided (different from defaults)"""
164165 default_repo = _config .get_yaml_value (DEFAULT_REPO ) # "https://github.com/raghavyuva/nixopus"
165166 default_branch = _config .get_yaml_value (DEFAULT_BRANCH ) # "master"
166-
167+
167168 # Check if either repo or branch differs from defaults
168169 repo_differs = self .repo is not None and self .repo != default_repo
169170 branch_differs = self .branch is not None and self .branch != default_branch
170-
171+
171172 return repo_differs or branch_differs
172173
173174 def run (self ):
@@ -424,13 +425,20 @@ def _update_environment_variables(self, env_values: dict) -> dict:
424425 view_host = self .view_domain if secure else f"{ host_ip } :{ self ._get_config ('view_port' )} "
425426 protocol = "https" if secure else "http"
426427 ws_protocol = "wss" if secure else "ws"
428+ super_tokens_api_port = self ._get_config ("services.api.env.SUPERTOKENS_API_PORT" ) or 3567
427429 key_map = {
428430 "ALLOWED_ORIGIN" : f"{ protocol } ://{ view_host } " ,
429431 "SSH_HOST" : host_ip ,
430432 "SSH_PRIVATE_KEY" : self ._get_config ("ssh_key_path" ),
431433 "WEBSOCKET_URL" : f"{ ws_protocol } ://{ api_host } /ws" ,
432434 "API_URL" : f"{ protocol } ://{ api_host } /api" ,
433435 "WEBHOOK_URL" : f"{ protocol } ://{ api_host } /api/v1/webhook" ,
436+ "NEXT_PUBLIC_API_URL" : f"{ protocol } ://{ api_host } /api" ,
437+ "NEXT_PUBLIC_WEBSITE_DOMAIN" : f"{ protocol } ://{ view_host } " ,
438+ "SUPERTOKENS_API_KEY" : "NixopusSuperTokensAPIKey" ,
439+ "SUPERTOKENS_API_DOMAIN" : f"{ protocol } ://{ api_host } /api" ,
440+ "SUPERTOKENS_WEBSITE_DOMAIN" : f"{ protocol } ://{ view_host } " ,
441+ "SUPERTOKENS_CONNECTION_URI" : f"{ protocol } ://{ api_host } :{ super_tokens_api_port } /api" ,
434442 }
435443
436444 for key , value in key_map .items ():
0 commit comments