diff --git a/backend/stack.ts b/backend/stack.ts index 92ffc48..f592fcc 100644 --- a/backend/stack.ts +++ b/backend/stack.ts @@ -167,8 +167,11 @@ export class Stack { // Write or overwrite the compose.yaml fs.writeFileSync(path.join(dir, this._composeFileName), this.composeYAML); + // Write or overwrite the .env - fs.writeFileSync(path.join(dir, ".env"), this.composeENV); + if (this.composeENV.trim() !== "") { + fs.writeFileSync(path.join(dir, ".env"), this.composeENV); + } } async deploy(socket? : DockgeSocket) : Promise {