From 379acd40e472bbd517901831f6b0a67838872ae4 Mon Sep 17 00:00:00 2001 From: John Cruikshank Date: Sun, 5 May 2024 22:43:52 +0000 Subject: [PATCH] docker compose status fix --- .../DockerCompose/DockerComposeServerHostAdapter.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ServerManager.DiscordBot/ServerHostAdapters/DockerCompose/DockerComposeServerHostAdapter.cs b/src/ServerManager.DiscordBot/ServerHostAdapters/DockerCompose/DockerComposeServerHostAdapter.cs index 4b16854..8c83863 100644 --- a/src/ServerManager.DiscordBot/ServerHostAdapters/DockerCompose/DockerComposeServerHostAdapter.cs +++ b/src/ServerManager.DiscordBot/ServerHostAdapters/DockerCompose/DockerComposeServerHostAdapter.cs @@ -26,8 +26,8 @@ public override async Task GetServerStatusAsync(CancellationToken return status switch { "Up" => ServerStatus.Running, - "Exited" => ServerStatus.Stopped, - _ => ServerStatus.Unknown + "Created" => ServerStatus.Starting, + _ => ServerStatus.Stopped }; } @@ -81,7 +81,7 @@ private Process StartDockerComposeProcess(string arguments) StartInfo = new ProcessStartInfo { FileName = Options.DockerProcessFilePath, - Arguments = $"compose -f {Context.Properties.DockerComposeFilePath} {arguments}", + Arguments = $"compose --file {Context.Properties.DockerComposeFilePath} {arguments}", RedirectStandardOutput = true, RedirectStandardError = true, UseShellExecute = false,