-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DP-362 - Add Global Docker Compose Stop #13
Changes from all commits
f2be777
3fa281e
03512cf
689491f
2145963
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
Package commands Copyright © 2021 NAME HERE <EMAIL ADDRESS> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need license stuff in here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good question. I don't see why it's needed but all the other commands have it at the top so I added it. Really just a case of if everyone else does it, would you. In this case yes ... yes I would. 😂 |
||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
package commands | ||
|
||
import ( | ||
"github.com/spf13/cobra" | ||
"github.com/wishabi/global-docker-compose/gdc" | ||
) | ||
|
||
// StopCmd represents the stop command | ||
var StopCmd = &cobra.Command{ | ||
Use: "stop", | ||
Short: "Stop Docker containers", | ||
Long: ` | ||
Stop either specified or all Docker containers. | ||
|
||
Usage: global_docker_compose stop {service} | ||
global_docker_compose stop | ||
`, | ||
Args: cobra.MaximumNArgs(1), | ||
Run: func(cmd *cobra.Command, args []string) { | ||
info := gdc.NewComposeInfo(ComposeFile, Services) | ||
gdc.Stop(info) | ||
gdc.Cleanup() | ||
}, | ||
} | ||
|
||
func init() { | ||
rootCmd.AddCommand(StopCmd) | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
version: '3.6' | ||
services: | ||
|
||
# ---------- DATABASES ---------- | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the last change goreleaser pushed a v2 that latest started pulling (and failing the CI due to a command removal). I felt updating to v2 of goreleaser was out of scope for this PR so I changed it to pull the most recent version of v1.