forked from cerc-io/stack-orchestrator
1 parent
d927c92c0a
commit
c737ec7ed6
3 files changed
+18
-9
No files matched your search
+4
-2
@@ -42,7 +42,7 @@ class base_stack(ABC):
|
||||
|
||||
class package_registry_stack(base_stack):
|
||||
|
||||
def ensure_available(self, ctx):
|
||||
def ensure_available(self):
|
||||
self.url = "<no registry url set>"
|
||||
# Check if we were given an external registry URL
|
||||
url_from_environment = os.environ.get("CERC_NPM_REGISTRY_URL")
|
||||
@@ -53,7 +53,7 @@ class package_registry_stack(base_stack):
|
||||
else:
|
||||
# Otherwise we expect to use the local package-registry stack
|
||||
# First check if the stack is up
|
||||
registry_running = get_stack_status("package-registry")
|
||||
registry_running = get_stack_status(self.config, "package-registry")
|
||||
if registry_running:
|
||||
# If it is available, get its mapped port and construct its URL
|
||||
if self.config.debug:
|
||||
@@ -61,6 +61,8 @@ class package_registry_stack(base_stack):
|
||||
self.url = "http://gitea.local:3000/api/packages/cerc-io/npm/"
|
||||
else:
|
||||
# If not, print a message about how to start it and return fail to the caller
|
||||
print("ERROR: The package-registry stack is not running, and no external registry specified with CERC_NPM_REGISTRY_URL")
|
||||
print("ERROR: Start the local package registry with: laconic-so --stack package-registry deploy-system up")
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
Reference in new issue
Block a user