MCPcopy
hub / github.com/louislam/dockge / constructor

Method constructor

backend/stack.ts:37–52  ·  view source on GitHub ↗
(server : DockgeServer, name : string, composeYAML? : string, composeENV? : string, skipFSOperations = false)

Source from the content-addressed store, hash-verified

35 protected static managedStackList: Map<string, Stack> = new Map();
36
37 constructor(server : DockgeServer, name : string, composeYAML? : string, composeENV? : string, skipFSOperations = false) {
38 this.name = name;
39 this.server = server;
40 this._composeYAML = composeYAML;
41 this._composeENV = composeENV;
42
43 if (!skipFSOperations) {
44 // Check if compose file name is different from compose.yaml
45 for (const filename of acceptedComposeFileNames) {
46 if (fs.existsSync(path.join(this.path, filename))) {
47 this._composeFileName = filename;
48 break;
49 }
50 }
51 }
52 }
53
54 async toJSON(endpoint : string) : Promise<object> {
55

Callers

nothing calls this directly

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected