From d7ec420f5adb5fd4e888a0ee2fd2abaffd9ed987 Mon Sep 17 00:00:00 2001 From: Karsten Dambekalns Date: Fri, 1 Apr 2022 10:06:23 +0200 Subject: [PATCH] WIP --- assets/project/.localbeach.docker-compose.yaml | 2 +- cmd/beach/cmd/pause.go | 2 +- cmd/beach/cmd/resume.go | 2 +- cmd/beach/cmd/setup-https.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/project/.localbeach.docker-compose.yaml b/assets/project/.localbeach.docker-compose.yaml index 77149f6..95f2c02 100644 --- a/assets/project/.localbeach.docker-compose.yaml +++ b/assets/project/.localbeach.docker-compose.yaml @@ -1,6 +1,6 @@ networks: local_beach: - external: true + name: local_beach services: webserver: diff --git a/cmd/beach/cmd/pause.go b/cmd/beach/cmd/pause.go index edc68da..ef8e059 100644 --- a/cmd/beach/cmd/pause.go +++ b/cmd/beach/cmd/pause.go @@ -36,7 +36,7 @@ func init() { func handlePauseRun(cmd *cobra.Command, args []string) { log.Info("Pausing reverse proxy and database server ...") - commandArgs := []string{"compose", "-f", path.Base + "compose.yaml", "stop", "webserver", "database"} + commandArgs := []string{"compose", "-f", path.Base + "compose.yaml", "-p", "LocalBeach", "stop", "webserver", "database"} output, err := exec.RunCommand("nerdctl", commandArgs) if err != nil { log.Fatal(output) diff --git a/cmd/beach/cmd/resume.go b/cmd/beach/cmd/resume.go index 089fd0d..15f9b9e 100644 --- a/cmd/beach/cmd/resume.go +++ b/cmd/beach/cmd/resume.go @@ -36,7 +36,7 @@ func init() { func handleResumeRun(cmd *cobra.Command, args []string) { log.Info("Starting reverse proxy and database server ...") - commandArgs := []string{"compose", "-f", path.Base + "compose.yaml", "start", "webserver", "database"} + commandArgs := []string{"compose", "-f", path.Base + "compose.yaml", "-p", "LocalBeach", "start", "webserver", "database"} output, err := exec.RunCommand("nerdctl", commandArgs) if err != nil { log.Fatal(output) diff --git a/cmd/beach/cmd/setup-https.go b/cmd/beach/cmd/setup-https.go index 6a63bd4..d418205 100644 --- a/cmd/beach/cmd/setup-https.go +++ b/cmd/beach/cmd/setup-https.go @@ -69,7 +69,7 @@ func handleSetupHttpsRun(cmd *cobra.Command, args []string) { if !strings.Contains(statusOutput, "local_beach_nginx") { log.Info("Restarting reverse proxy ...") - commandArgs = []string{"compose", "-f", path.Base + "compose.yaml", "restart"} + commandArgs = []string{"compose", "-f", path.Base + "compose.yaml", "-p", "LocalBeach", "restart"} output, err := exec.RunCommand("nerdctl", commandArgs) if err != nil { log.Fatal(output)