From 86582104a5c6451e9f5da4f0326a830ec9aee655 Mon Sep 17 00:00:00 2001 From: AdheipSingh Date: Wed, 17 Jul 2024 14:40:57 +0530 Subject: [PATCH] fix: updated docker compose command --- README.md | 2 +- cmd/ps.go | 4 ++-- cmd/root.go | 2 +- cmd/scan.go | 4 ++-- docs/README.md | 2 +- hossted/logs.go | 6 +++--- hossted/ps.go | 4 ++-- hossted/service/compose/reconcile_compose.go | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 2ed1c0e..a781bd8 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ The hossted cli - built to interact with a hossted container | | hossted set ssl \ sign | (TBC) | | | hossted set remote-support true | To enable or disable remote ssh access with our maintanece and support key | | logs | hossted logs \ | View Application logs | -| ps | hossted ps \ | docker-compose ps of the application | +| ps | hossted ps \ | docker compose ps of the application | | version | hossted version | Get the version of the hossted CLI program | | | | | | ip | - | (TBC) Get external and internal ip addresses | diff --git a/cmd/ps.go b/cmd/ps.go index b644692..77d3f6b 100644 --- a/cmd/ps.go +++ b/cmd/ps.go @@ -20,8 +20,8 @@ var ( // hossted ps var psCmd = &cobra.Command{ Use: "ps", - Short: "[ps] docker-compose ps of the application", - Long: "[ps] docker-compose ps of the application", + Short: "[ps] docker compose ps of the application", + Long: "[ps] docker compose ps of the application", Example: ` hossted ps hossted ps (e.g. hossted ps wikijs) diff --git a/cmd/root.go b/cmd/root.go index 3ee7850..0acb478 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -69,7 +69,7 @@ Available Commands: | help | hossted help | Help about any command | | logs | hossted log | View application logs | | status | hossted status | View Hossted status | - | ps | hossted ps | docker-compose ps of the application | + | ps | hossted ps | docker compose ps of the application | | version | hossted version | Displays the current running version of the CLI | | update-cli | hossted update-cli | Updates the Hossted CLI to the latest version | |-------------------------------+-------------------------+--------------------------------------------------------------------------------------------| diff --git a/cmd/scan.go b/cmd/scan.go index 73e723f..70c3ec4 100644 --- a/cmd/scan.go +++ b/cmd/scan.go @@ -14,8 +14,8 @@ import ( // hossted ps var scanCmd = &cobra.Command{ Use: "scan", - Short: "[scan] docker-compose ps of the application", - Long: "[scan] docker-compose ps of the application", + Short: "[scan] docker compose ps of the application", + Long: "[scan] docker compose ps of the application", Example: ` hossted scan hossted scan images diff --git a/docs/README.md b/docs/README.md index 55e8288..639ceaf 100644 --- a/docs/README.md +++ b/docs/README.md @@ -32,7 +32,7 @@ The hossted cli - built to interact with a hossted container | | hossted set ssl \ sign | (TBC) | | | hossted set remote-support true | To enable or disable remote ssh access with our maintanece and support key | | logs | hossted logs \ | View Application logs | -| ps | hossted ps \ | docker-compose ps of the application | +| ps | hossted ps \ | docker compose ps of the application | | version | hossted version | Get the version of the hossted CLI program | | | | | | ip | - | (TBC) Get external and internal ip addresses | diff --git a/hossted/logs.go b/hossted/logs.go index 585d986..65c3b84 100644 --- a/hossted/logs.go +++ b/hossted/logs.go @@ -6,7 +6,7 @@ import ( "os/exec" ) -// GetAppLogs goes to the app directory, then calls docker-compose logs +// GetAppLogs goes to the app directory, then calls docker compose logs // Similar to ListAppPS func func GetAppLogs(input string, followFlag bool) error { @@ -25,9 +25,9 @@ func GetAppLogs(input string, followFlag bool) error { } var cmd *exec.Cmd if followFlag { - cmd = exec.Command("sudo", "docker-compose", "logs", "-f") + cmd = exec.Command("sudo", "docker compose", "logs", "-f") } else { - cmd = exec.Command("sudo", "docker-compose", "logs") + cmd = exec.Command("sudo", "docker compose", "logs") } cmd.Dir = app.AppPath diff --git a/hossted/ps.go b/hossted/ps.go index baffac1..f42617a 100644 --- a/hossted/ps.go +++ b/hossted/ps.go @@ -5,7 +5,7 @@ import ( "os/exec" ) -// ListAppPS goes to the app directory, then calls docker-compose ps +// ListAppPS goes to the app directory, then calls docker compose ps // if input is "", call prompt to get user input, otherwise look up the application in the config func ListAppPS(input string) error { var app ConfigApplication @@ -20,7 +20,7 @@ func ListAppPS(input string) error { return err } - cmd := exec.Command("sudo", "docker-compose", "ps") + cmd := exec.Command("sudo", "docker compose", "ps") cmd.Dir = app.AppPath out, err := cmd.Output() diff --git a/hossted/service/compose/reconcile_compose.go b/hossted/service/compose/reconcile_compose.go index dc3895b..cfb0bcb 100644 --- a/hossted/service/compose/reconcile_compose.go +++ b/hossted/service/compose/reconcile_compose.go @@ -591,7 +591,7 @@ func runMonitoringCompose(monitoringEnable, osUUID, appUUID string) error { composeFile := os.Getenv("HOME") + "/.hossted/compose/monitoring/docker-compose.yaml" // Create the command to run Docker Compose - cmd := exec.Command("docker-compose", "-f", composeFile, "up", "-d") + cmd := exec.Command("docker compose", "-f", composeFile, "up", "-d") // Set the command's output to the standard output cmd.Stdout = os.Stdout