From 4b51f8251b2f43bf7ce623bf2fcfe37a26391173 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Thu, 9 May 2024 12:22:49 +0200 Subject: [PATCH] fix: change permissions on newly created dirs --- app/Actions/Server/StartSentinel.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Actions/Server/StartSentinel.php b/app/Actions/Server/StartSentinel.php index e0c8b288e..c40694132 100644 --- a/app/Actions/Server/StartSentinel.php +++ b/app/Actions/Server/StartSentinel.php @@ -13,6 +13,10 @@ class StartSentinel if ($restart) { instant_remote_process(['docker rm -f coolify-sentinel'], $server, false); } - return instant_remote_process(["docker run --rm --pull always -d --name coolify-sentinel -v /var/run/docker.sock:/var/run/docker.sock -v /data/coolify/metrics:/app/metrics -v /data/coolify/logs:/app/logs --pid host --health-cmd \"curl --fail http://127.0.0.1:8888/api/health || exit 1\" --health-interval 10s --health-retries 3 ghcr.io/coollabsio/sentinel:$version"], $server, false); + instant_remote_process([ + "docker run --rm --pull always -d --name coolify-sentinel -v /var/run/docker.sock:/var/run/docker.sock -v /data/coolify/metrics:/app/metrics -v /data/coolify/logs:/app/logs --pid host --health-cmd \"curl --fail http://127.0.0.1:8888/api/health || exit 1\" --health-interval 10s --health-retries 3 ghcr.io/coollabsio/sentinel:$version", + "chown -R 9999:root /data/coolify/metrics /data/coolify/logs", + "chmod -R 600 /data/coolify/metrics /data/coolify/logs" + ], $server, false); } }