Skip to content

Commit

Permalink
feat #194: Load .pc_env on PC start
Browse files Browse the repository at this point in the history
  • Loading branch information
F1bonacc1 committed Aug 9, 2024
1 parent 2ad462d commit 4ce8ac7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/cmd/0-init.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"
"github.com/f1bonacc1/process-compose/src/config"
"github.com/f1bonacc1/process-compose/src/tui"
"github.com/joho/godotenv"
"github.com/spf13/pflag"
"strings"
)
Expand All @@ -18,6 +19,7 @@ const (
)

func init() {
_ = godotenv.Load(".pc_env")
pcFlags = config.NewFlags()
commonFlags = pflag.NewFlagSet("", pflag.ContinueOnError)
commonFlags.BoolVarP(pcFlags.IsReverseSort, flagReverse, "R", *pcFlags.IsReverseSort, "sort in reverse order")
Expand Down
10 changes: 10 additions & 0 deletions www/docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,16 @@ processes:
- 'OUTPUT_DIR=/path/to/B/data'
```

## .pc_env file

`.pc_env` file allows you to control Process Compose local, user environment specific settings.
Ideally it should contain Process Compose specific environment variables:
```.env
PC_DISABLE_TUI=1
PC_PORT_NUM=8080
PC_NO_SERVER=1
```

## Disable Automatic Expansion

Process Compose provides 2 ways to disable the automatic environment variables expansion:
Expand Down

0 comments on commit 4ce8ac7

Please sign in to comment.