-
Notifications
You must be signed in to change notification settings - Fork 26
Add all known outstanding yaml config options as of process-compose v1.7.3 #98
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
82b20a8
Add all known outstanding yaml config options as of process-compose v…
daroot 32c0d88
new: add additional PC_ env variables
daroot 30009e4
fix: import of vars.nix needs no extra args now
daroot e5f94cb
Merge branch 'main' into add-options
shivaraj-bh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,122 @@ | ||
| { name, lib, ... }: | ||
|
|
||
| let | ||
| inherit (lib) types mkOption; | ||
| inherit (types) nullOr listOf str enum bool; | ||
| in | ||
| { | ||
| options = { | ||
| rotation = mkOption { | ||
| type = types.submodule { | ||
| options = { | ||
| max_size_mb = mkOption { | ||
| type = types.nullOr types.ints.unsigned; | ||
| default = null; | ||
| example = 1; | ||
| description = '' | ||
| Maximum size in MB of the logfile before it's rolled. | ||
| ''; | ||
| }; | ||
| max_backups = mkOption { | ||
| type = types.nullOr types.ints.unsigned; | ||
| default = null; | ||
| example = 3; | ||
| description = '' | ||
| Maximum number of rolled logfiles to keep. | ||
| ''; | ||
| }; | ||
| max_age_days = mkOption { | ||
| type = types.nullOr types.ints.unsigned; | ||
| default = null; | ||
| example = 7; | ||
| description = '' | ||
| Maximum age in days to keep a rolled logfile. | ||
| ''; | ||
| }; | ||
| compress = mkOption { | ||
| type = types.nullOr types.bool; | ||
| default = null; | ||
| example = true; | ||
| description = '' | ||
| If enabled, compress rolled logfiles with gzip. | ||
| ''; | ||
| }; | ||
| }; | ||
| }; | ||
| default = { }; | ||
| description = '' | ||
| Settings related to process log rotation. | ||
| ''; | ||
| }; | ||
|
|
||
| fields_order = mkOption { | ||
| type = nullOr (listOf (enum [ | ||
| "time" | ||
| "level" | ||
| "message" | ||
| # technically arbitrary, but these are defined in config. | ||
| ]) | ||
| ); | ||
| default = null; | ||
| example = [ | ||
| "time" | ||
| "level" | ||
| "message" | ||
| ]; | ||
| description = '' | ||
| Order of logging fields. The default is time, level, message | ||
| ''; | ||
| }; | ||
| disable_json = mkOption { | ||
| type = nullOr bool; | ||
| default = null; | ||
| example = false; | ||
| description = '' | ||
| If enabled, output as plain text rather than json. | ||
| ''; | ||
| }; | ||
| timestamp_format = mkOption { | ||
| type = nullOr str; | ||
| default = null; | ||
| example = "2006-01-02T15:04:05.000Z"; | ||
| description = '' | ||
| Timestamp format, per Go's time.Parse function. | ||
| Requires `add_timestamp` be enabled to be effective. | ||
| See https://pkg.go.dev/time#pkg-constants for examples. | ||
| ''; | ||
| }; | ||
| no_color = mkOption { | ||
| type = nullOr bool; | ||
| default = null; | ||
| example = false; | ||
| description = '' | ||
| Enabling `no_color` prevents the use of ANSI colors in the logger. | ||
| ''; | ||
| }; | ||
| no_metadata = mkOption { | ||
| type = nullOr bool; | ||
| default = null; | ||
| example = true; | ||
| description = '' | ||
| If enabled, do not add process name and replica number to logs. | ||
| ''; | ||
| }; | ||
| add_timestamp = mkOption { | ||
| type = nullOr bool; | ||
| default = null; | ||
| example = true; | ||
| description = '' | ||
| If enabled, prepends a timestamp to log entries. | ||
| ''; | ||
| }; | ||
| flush_each_line = mkOption { | ||
| type = nullOr bool; | ||
| default = null; | ||
| example = true; | ||
| description = '' | ||
| If enabled, disables output buffering and flushes each line to the logfile immediately. | ||
| ''; | ||
| }; | ||
| }; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
daroot marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| { lib, ... }: | ||
| let | ||
| inherit (lib) types; | ||
| inherit (types) nullOr attrsOf anything; | ||
| in | ||
| args: | ||
| lib.mkOption ( | ||
| args | ||
| // { | ||
| # maybe YAML/JSON limited or smarter coerce to string? | ||
| type = nullOr (attrsOf anything); | ||
| description = '' | ||
| Variables used by process-compose to expand Go Template configs on various values. | ||
|
|
||
| Includes processes.process.command, working_dir, log_location, etc. | ||
| See https://f1bonacc1.github.io/process-compose/configuration#variables | ||
| ''; | ||
| default = null; | ||
| example = { | ||
| THIS = "THAT"; | ||
| A_NUMBER = 8888; | ||
| OK = "SUCCESS"; | ||
| }; | ||
| } | ||
| ) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.