MCPcopy Create free account
hub / github.com/Coooolfan/onlyboxes / DeploymentPlan

Class DeploymentPlan

scripts/install.py:71–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69
70
71class DeploymentPlan:
72 def __init__(self, console_start: str, worker_runtime: str, worker_start: str):
73 self.console_start = console_start # "docker" | "systemd" | "foreground"
74 self.worker_runtime = worker_runtime # "docker" | "boxlite"
75 self.worker_start = worker_start # "systemd" | "foreground"
76
77 @property
78 def worker_service_name(self) -> str:
79 return f"onlyboxes-worker-{self.worker_runtime}"
80
81 @property
82 def worker_binary_name(self) -> str:
83 return f"onlyboxes-worker-{self.worker_runtime}"
84
85 @property
86 def worker_asset_template(self) -> str:
87 if self.worker_runtime == "docker":
88 return WORKER_DOCKER_ASSET_TEMPLATE
89 return WORKER_BOXLITE_ASSET_TEMPLATE
90
91 @property
92 def has_foreground(self) -> bool:
93 return self.console_start == "foreground" or self.worker_start == "foreground"
94
95
96# ---------------------------------------------------------------------------

Callers 1

detect_environmentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected