| 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 | |