Skip to content

Commit

Permalink
add logs to docker up command
Browse files Browse the repository at this point in the history
  • Loading branch information
paramah committed Nov 28, 2023
1 parent d6d71b5 commit 4daacb0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ dist
main
ledo
.ledo-back.yml
.scannerwork
9 changes: 9 additions & 0 deletions app/cmd/container/up.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ var CmdDockerUp = cli.Command{
Usage: "build local images before run",
Required: false,
},
&cli.BoolFlag{
Name: "logs",
Aliases: []string{"l"},
Usage: "show logs after up",
Required: false,
},
},
}

Expand All @@ -33,5 +39,8 @@ func RunComposeUp(cmd *cli.Context) error {
compose.ExecComposerBuild(ctx, *cmd)
}
compose.ExecComposerUp(ctx, cmd.Bool("no-detach"))
if cmd.Bool("logs") {
compose.ExecComposerLogs(ctx, cmd.Args())
}
return nil
}

0 comments on commit 4daacb0

Please sign in to comment.