func PullCommand(factory app.ProjectFactory) cli.Command { return cli.Command{ Name: "pull", Usage: "Pulls images for services", Action: app.WithProject(factory, app.ProjectPull), } }
func UpgradeCommand(factory app.ProjectFactory) cli.Command { return cli.Command{ Name: "upgrade", Usage: "Perform rolling upgrade between services", Action: app.WithProject(factory, Upgrade), Flags: []cli.Flag{ cli.IntFlag{ Name: "batch-size", Usage: "Number of containers to upgrade at once", Value: 2, }, cli.IntFlag{ Name: "scale", Usage: "Final number of running containers", Value: -1, }, cli.IntFlag{ Name: "interval", Usage: "Update interval in milliseconds", Value: 2000, }, cli.BoolTFlag{ Name: "update-links", Usage: "Update inbound links on target service", }, cli.BoolFlag{ Name: "wait,w", Usage: "Wait for upgrade to complete", }, }, } }
func CreateCommand(factory app.ProjectFactory) cli.Command { return cli.Command{ Name: "create", Usage: "Create all services but do not start", Action: app.WithProject(factory, app.ProjectCreate), } }
func PsCommand(factory app.ProjectFactory) cli.Command { return cli.Command{ Name: "ps", Usage: "List containers", Action: app.WithProject(factory, app.ProjectPs), } }
func BuildCommand(factory app.ProjectFactory) cli.Command { return cli.Command{ Name: "build", Usage: "Build or rebuild services.", Action: app.WithProject(factory, app.ProjectBuild), } }
func ScaleCommand(factory app.ProjectFactory) cli.Command { return cli.Command{ Name: "scale", Usage: "Scale services", Action: app.WithProject(factory, app.ProjectScale), } }
func StartCommand(factory app.ProjectFactory) cli.Command { return cli.Command{ Name: "start", Usage: "Start services", Action: app.WithProject(factory, app.ProjectUp), } }
func StartCommand(factory app.ProjectFactory) cli.Command { return cli.Command{ Name: "start", Usage: "Start services", Action: app.WithProject(factory, app.ProjectStart), Flags: []cli.Flag{ cli.BoolTFlag{ Name: "d", Usage: "Do not block and log", }, }, } }
func UpCommand(factory app.ProjectFactory) cli.Command { return cli.Command{ Name: "up", Usage: "Bring all services up", Action: app.WithProject(factory, app.ProjectUp), Flags: []cli.Flag{ cli.BoolFlag{ Name: "d", Usage: "Do not block and log", }, }, } }
func RmCommand(factory app.ProjectFactory) cli.Command { return cli.Command{ Name: "rm", Usage: "Delete services", Action: app.WithProject(factory, app.ProjectDelete), Flags: []cli.Flag{ cli.BoolFlag{ Name: "force,f", Usage: "Allow deletion of all services", }, }, } }
func LogsCommand(factory app.ProjectFactory) cli.Command { return cli.Command{ Name: "logs", Usage: "Get service logs", Action: app.WithProject(factory, app.ProjectLog), Flags: []cli.Flag{ cli.IntFlag{ Name: "lines", Usage: "number of lines to tail", Value: 100, }, }, } }
func KillCommand(factory app.ProjectFactory) cli.Command { return cli.Command{ Name: "kill", Usage: "Force stop service containers", Action: app.WithProject(factory, app.ProjectKill), Flags: []cli.Flag{ cli.StringFlag{ Name: "signal,s", Usage: "SIGNAL to send to the container", Value: "SIGKILL", }, }, } }
func ScaleCommand(factory app.ProjectFactory) cli.Command { return cli.Command{ Name: "scale", Usage: "Scale services", Action: app.WithProject(factory, app.ProjectScale), Flags: []cli.Flag{ cli.IntFlag{ Name: "timeout,t", Usage: "Specify a shutdown timeout in seconds.", Value: 10, }, }, } }
func StopCommand(factory app.ProjectFactory) cli.Command { return cli.Command{ Name: "stop", ShortName: "down", Usage: "Stop services", Action: app.WithProject(factory, app.ProjectDown), Flags: []cli.Flag{ cli.IntFlag{ Name: "timeout,t", Usage: "Specify a shutdown timeout in seconds.", Value: 10, }, }, } }
func PortCommand(factory app.ProjectFactory) cli.Command { return cli.Command{ Name: "port", Usage: "Print the public port for a port binding", Action: app.WithProject(factory, app.ProjectPort), Flags: []cli.Flag{ cli.StringFlag{ Name: "protocol", Usage: "tcp or udp ", Value: "tcp", }, cli.IntFlag{ Name: "index", Usage: "index of the container if there are multiple instances of a service", Value: 1, }, }, } }