-
Notifications
You must be signed in to change notification settings - Fork 6
feat: configure server with env variables #45
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
Changes from all commits
Commits
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,100 @@ | ||
| # Someguy Environment Variables | ||
|
|
||
| `someguy` ships with some implicit defaults that can be adjusted via env variables below. | ||
|
|
||
| - [Configuration](#configuration) | ||
| - [`SOMEGUY_PORT`](#someguy_port) | ||
| - [`SOMEGUY_ACCELERATED_DHT`](#someguy_accelerated_dht) | ||
| - [`SOMEGUY_PROVIDER_ENDPOINTS`](#someguy_provider_endpoints) | ||
| - [`SOMEGUY_PEER_ENDPOINTS`](#someguy_peer_endpoints) | ||
| - [`SOMEGUY_IPNS_ENDPOINTS`](#someguy_ipns_endpoints) | ||
| - [Logging](#logging) | ||
| - [`GOLOG_LOG_LEVEL`](#golog_log_level) | ||
| - [`GOLOG_LOG_FMT`](#golog_log_fmt) | ||
| - [`GOLOG_FILE`](#golog_file) | ||
| - [`GOLOG_TRACING_FILE`](#golog_tracing_file) | ||
|
|
||
| ## Configuration | ||
|
|
||
| ### `SOMEGUY_PORT` | ||
|
|
||
| The port to listen on to. | ||
|
|
||
| Default: `8080` | ||
|
|
||
| ### `SOMEGUY_ACCELERATED_DHT` | ||
|
|
||
| Whether or not the Accelerated DHT is enabled or not. | ||
|
|
||
| Default: `true` | ||
|
|
||
| ### `SOMEGUY_PROVIDER_ENDPOINTS` | ||
|
|
||
| Comma-separated list of other Delegated Routing V1 endpoints to proxy provider requests to. | ||
|
|
||
| Default: `https://cid.contact` | ||
|
|
||
| ### `SOMEGUY_PEER_ENDPOINTS` | ||
|
|
||
| Comma-separated list of other Delegated Routing V1 endpoints to proxy peer requests to. | ||
|
|
||
| Default: none | ||
|
|
||
| ### `SOMEGUY_IPNS_ENDPOINTS` | ||
|
|
||
| Comma-separated list of other Delegated Routing V1 endpoints to proxy IPNS requests to. | ||
|
|
||
| Default: none | ||
|
|
||
| ## Logging | ||
|
|
||
| ### `GOLOG_LOG_LEVEL` | ||
|
|
||
| Specifies the log-level, both globally and on a per-subsystem basis. Level can | ||
| be one of: | ||
|
|
||
| * `debug` | ||
| * `info` | ||
| * `warn` | ||
| * `error` | ||
| * `dpanic` | ||
| * `panic` | ||
| * `fatal` | ||
|
|
||
| Per-subsystem levels can be specified with `subsystem=level`. One global level | ||
| and one or more per-subsystem levels can be specified by separating them with | ||
| commas. | ||
|
|
||
| Default: `error` | ||
|
|
||
| Example: | ||
|
|
||
| ```console | ||
| GOLOG_LOG_LEVEL="error,someguy=debug" someguy | ||
| ``` | ||
|
|
||
| ### `GOLOG_LOG_FMT` | ||
|
|
||
| Specifies the log message format. It supports the following values: | ||
|
|
||
| - `color` -- human readable, colorized (ANSI) output | ||
| - `nocolor` -- human readable, plain-text output. | ||
| - `json` -- structured JSON. | ||
|
|
||
| For example, to log structured JSON (for easier parsing): | ||
|
|
||
| ```bash | ||
| export GOLOG_LOG_FMT="json" | ||
| ``` | ||
| The logging format defaults to `color` when the output is a terminal, and | ||
| `nocolor` otherwise. | ||
|
|
||
| ### `GOLOG_FILE` | ||
|
|
||
| Sets the file to which the logs are saved. By default, they are printed to the standard error output. | ||
|
|
||
| ### `GOLOG_TRACING_FILE` | ||
|
|
||
| Sets the file to which the tracing events are sent. By default, tracing is disabled. | ||
|
|
||
| Warning: Enabling tracing will likely affect performance. |
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💭 I think after this PR is merged we can adjust the default, see #47