0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-16 21:56:25 -05:00
verdaccio/docs/env.variables.md
osher ac45c0b5b2
feature: config control for colors in logs (#3011)
* pass `logs.colors` as `prettyOptions.colorize`

* `prettyPrintOptions` defaults is no concern of `createLogger`

* call it `colors` not to confuse with `pinoPretty.colorize`

* fix hardcoded `true` for `options.colors`

* Support `VERDACCIO_LOGGER_COLORS` overriding env-var

* Update docs for `VERDACCIO_LOGGER_COLORS`

* docs for `VERDACCIO_LOGGER_COLORS`

* docs for `VERDACCIO_LOGGER_COLORS`

* `.isTTY` from `stdout` not `stdin`

both work, but I want to ask if I emit to TTY, not if I consume from TTY.

* .md format

* format

* more format guesses

* declare `PrettyOptionsExtended.colors`

* lint

* docs: `EXPERIMENTAL__` prefix

* logger.ts - prefix `EXPERIMENTAL__`

* Update env.variables.md

* env.variables.md - remove double `_`

* Update logger.ts

* logger.ts - remove double `_`, fix boolean parsing

* env.variables.md - explain boolean parsing

* chore: format

* chore: add format, improve logic

Co-authored-by: Juan Picado <juanpicado19@gmail.com>
2022-03-02 23:41:30 +01:00

55 lines
1.7 KiB
Markdown

# Environment variables
A full list of available environment variables that allow override
internal features.
#### VERDACCIO_HANDLE_KILL_SIGNALS
Enables gracefully shutdown, more info [here](https://github.com/verdaccio/verdaccio/pull/2121).
This will be enable by default on Verdaccio 5.
#### VERDACCIO_PUBLIC_URL
Define a specific public url for your server, it overrules the `Host` and `X-Forwarded-Proto` header if a reverse proxy is being used, it takes in account the `url_prefix` if is defined.
This is handy in such situations where a dynamic url is required.
eg:
```
VERDACCIO_PUBLIC_URL='https://somedomain.org';
url_prefix: '/my_prefix'
// url -> https://somedomain.org/my_prefix/
VERDACCIO_PUBLIC_URL='https://somedomain.org';
url_prefix: '/'
// url -> https://somedomain.org/
VERDACCIO_PUBLIC_URL='https://somedomain.org/first_prefix';
url_prefix: '/second_prefix'
// url -> https://somedomain.org/second_prefix/'
```
#### VERDACCIO_FORWARDED_PROTO
The default header to identify the protocol is `X-Forwarded-Proto`, but there are some environments which [uses something different](https://github.com/verdaccio/verdaccio/issues/990), to change it use the variable `VERDACCIO_FORWARDED_PROTO`
```
$ VERDACCIO_FORWARDED_PROTO=CloudFront-Forwarded-Proto verdaccio --listen 5000
```
#### VERDACCIO_STORAGE_PATH
By default, the storage is taken from config file, but using this variable allows to set it from environment variable.
#### EXPERIMENTAL_VERDACCIO_LOGGER_COLORS
Overrides `logs.colors` from the `config.yaml`.
Note that any value that other than `false` will result in `true`.
When both are not provided - the colors are on by default for TTY processes, and off for processes that are not.