Skip to content

Commit

Permalink
feat : Added configuration to compose.yaml to start without TUI
Browse files Browse the repository at this point in the history
  • Loading branch information
F1bonacc1 committed Aug 17, 2024
1 parent 1f86a5d commit 9631b60
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion process-compose.override.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "0.5"
log_level: debug
log_length: 3000
is_strict: true
is_tui_disabled: true
#is_tui_disabled: true
environment:
- 'ABC=222'
log_location: ./pc.log
Expand Down
1 change: 1 addition & 0 deletions src/cmd/project_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ func getProjectRunner(process []string, noDeps bool, mainProcess string, mainPro
if err != nil {
log.Fatal().Err(err).Msg("Failed to load project")
}
*pcFlags.IsTuiEnabled = !project.IsTuiDisabled

prjOpts := app.ProjectOpts{}

Expand Down
2 changes: 1 addition & 1 deletion src/loader/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func Load(opts *LoaderOptions) (*types.Project, error) {
return nil, err
}
mergedProject.FileNames = opts.FileNames
mergedProject.IsTuiDisabled = opts.isTuiDisabled
mergedProject.IsTuiDisabled = opts.isTuiDisabled || mergedProject.IsTuiDisabled

apply(mergedProject,
setDefaultShell,
Expand Down
7 changes: 7 additions & 0 deletions www/docs/tui.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ TUI is the default run mode, but it's possible to disable it:
./process-compose -t=false
```

Alternatively it can be disabled with `PC_DISABLE_TUI=1` environment variable or in `process-compose.yaml`:

```yaml hl_lines="2"
version: "0.5"
is_tui_disabled: true
```
Control the UI log buffer size:
```yaml
Expand Down

0 comments on commit 9631b60

Please sign in to comment.