From 45a18c0ecb364c42307641b4057ff5a814e69b2e Mon Sep 17 00:00:00 2001 From: Leonardo Bishop Date: Fri, 25 Apr 2025 00:54:15 +0100 Subject: Version control --- manage.php | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 manage.php (limited to 'manage.php') diff --git a/manage.php b/manage.php new file mode 100644 index 0000000..c4858ca --- /dev/null +++ b/manage.php @@ -0,0 +1,68 @@ + + + + + + Manage container + + + + + +
+

Manage container:

+ Home + Status +
+ name; + //}, $services))) { + // Util\createBanner('✗', "Service '$service' is unknown", 'bad'); + // return; + //} + + $status = Util\getDockerStatus($container); + + if ($status->status === '-') { + Util\createBanner('✗', "Container '$container' not found", 'bad'); + return; + } + + if ($action === 'start' || $action === 'stop' || $action === 'restart' || $action === 'logs') { + // if ($action === 'start' || $action === 'stop' || $action === 'restart') { + $safeService = escapeshellarg($container); + Util\doShellExec('sudo docker ' . $action . ' ' . $safeService, '/manage.php?container=' . $container, $action); + } + + Util\createStatusBanner($status); + ?> +

+

+ Status as reported by Docker + +
+

+ +

+ [Logs] + [Start] + [Stop] + [Restart] +

+
+ -- cgit v1.2.3-70-g09d2