Skip to content

Commit 6d9315d

Browse files
committed
Update deployment of files and added pre-push git hook.
1 parent 5ceeb49 commit 6d9315d

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

app/Console/Commands/AppDeployFiles.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ public function handle()
8787
exec("sed -i 's*$search*$replace*g' $file");
8888
});
8989
});
90+
91+
$this->createSupervisorDirectory();
9092
}
9193

9294
/**
@@ -115,4 +117,18 @@ private function setAppsConfigs()
115117
'SERVER_USER',
116118
]);
117119
}
120+
121+
/**
122+
* Create supervisor log directory for the application.
123+
*
124+
* Creates a subdirectory under /var/log/supervisor using the application tag
125+
* from configuration. Uses sudo to ensure proper permissions.
126+
*/
127+
private function createSupervisorDirectory(): void
128+
{
129+
$logDir = '/var/log/supervisor';
130+
$appTag = config('app.tag');
131+
$appLogDir = "{$logDir}/{$appTag}";
132+
exec("sudo mkdir -p {$appLogDir}");
133+
}
118134
}

0 commit comments

Comments
 (0)