website: update env and migration docs (#5051)

This commit is contained in:
Marc Bernard
2025-01-16 21:19:48 +01:00
committed by GitHub
parent d6718a671b
commit 3ab6b670cb
9 changed files with 56 additions and 74 deletions

View File

@@ -10,6 +10,12 @@ The following table describes the versions of this project:
| 7.x next | :x: | 18 | 7.x | next-7 | 7.x-next | n/a |
| 8.x experimental | :x: | 18 | master | next-8 | nightly-master | n/a |
## Migration Guide
The migration from Verdaccio v5/v6 to v7 contains breaking changes. Refer to the priliminary [migration guide](https://github.com/verdaccio/verdaccio/blob/master/docs/migration-v5-to-v6.md) for more information.
For migrations from older versions to v5/6 refer to the [v5 migration guide](https://verdaccio.org/blog/2021/04/14/verdaccio-5-migration-guide/).
## Npm Registry
The official Verdaccio npm packages are located at https://www.npmjs.com/package/verdaccio.

View File

@@ -1,55 +0,0 @@
# Environment variables
A full list of available environment variables that allow override
internal features.
#### VERDACCIO_LEGACY_ALGORITHM
Allows to define the specific algorithm for the token signature which by default is `aes-256-ctr`. The algorithm must be supported by `crypto.createCipheriv` and `crypto.createDecipheriv`.
Read more here: https://nodejs.org/api/crypto.html#crypto_crypto_createcipheriv_algorithm_key_iv_options
#### VERDACCIO_LEGACY_ENCRYPTION_KEY
By default, the token stores in the database, but using this variable allows to get it from memory, the length must be 32 characters otherwise will throw an error.
Read more here: https://nodejs.org/api/crypto.html#crypto_crypto_createcipheriv_algorithm_key_iv_options
#### 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.
#### VERDACCIO_STORAGE_NAME
The database name for `@verdaccio/local-storage` is by default `.verdaccio-db.json`, but this can be update by using this variable.

View File

@@ -1,4 +1,4 @@
# Migration Guide from Verdaccio 5 to Verdaccio 6
# Migration Guide from Verdaccio v5 and v6 to Verdaccio v7
Notes regarding breaking changes for next major release.
@@ -79,8 +79,15 @@ for more details.
Introduce environment variables for legacy tokens.
- `VERDACCIO_LEGACY_ALGORITHM`: Allows to define the specific algorithm for the token signature which by default is `aes-256-ctr`
- `VERDACCIO_LEGACY_ENCRYPTION_KEY`: By default, the token stores in the database, but using this variable allows to get it from memory
- `VERDACCIO_LEGACY_ALGORITHM`:
Allows to define the specific algorithm for the token signature which by default is `aes-256-ctr`. The algorithm must be supported by `crypto.createCipheriv` and `crypto.createDecipheriv`.
- `VERDACCIO_LEGACY_ENCRYPTION_KEY`:
By default, the token are stored in the database, but using this variable allows to get tokens from memory. The length of the key must be 32 characters otherwise will throw an error.
Read more on [nodejs.org](https://nodejs.org/api/crypto.html#crypto_crypto_createcipheriv_algorithm_key_iv_options).
#### @verdaccio/commons-api migration

View File

@@ -1,3 +0,0 @@
## Developing plugins
TBA

View File

@@ -2,29 +2,44 @@
## VERWAR001
Verdaccio doesn't need superuser privileges. Don't run it under root.
`Verdaccio doesn't need superuser privileges. Don't run it under root.`
## VERWAR002
logger is not defined
`The configuration property "logs" has been deprecated, please rename to "log" for future compatibility`
## VERWAR003
'rotating-file type is not longer supported, consider use [logrotate] instead'
`rotating-file type is not longer supported, consider use [logrotate] instead`
## VERWAR004
invalid address - xxxxxx, we expect a port (e.g. "4873"),
`invalid address - %s, we expect a port (e.g. "4873"), host:port (e.g. "localhost:4873") or full url '(e.g. "http://localhost:4873/")`
Learn more at https://verdaccio.org/docs/en/configuration#listen-port
## VERWAR005
`n/a`
## VERWAR006
`the auth plugin method "add_user" in the auth plugin is deprecated and will be removed in next major release, rename to "adduser"`
## VERWAR007
`the secret length is too long, it must be 32 characters long, please consider generate a new one`
Learn more at https://verdaccio.org/docs/configuration/#.verdaccio-db
## VERDEP001
'config.logs is deprecated, rename configuration to "config.log" in singular'
> Changed to VERWAR002 (see above)
## VERDEP002
> After version `verdaccio@6.0.0-6-next.38` this is not longer a warning and
> will crash your application
> After version `verdaccio@6.0.0-6-next.38` this is not longer a warning and will crash your application
## VERDEP003
'multiple addresses will be deprecated in the next major, only use one'
`multiple addresses will be deprecated in the next major, only use one`

View File

@@ -20,6 +20,8 @@ Below is a list of articles about Verdaccio. If you have written a blog post or
- [Setting up Verdaccio on DigitalOcean](https://medium.com/verdaccio/setting-up-verdaccio-on-digitalocean-61b5d08e4f0d)
- [How I learned React Js and how you can…](https://medium.com/verdaccio/how-i-learned-react-js-and-how-you-can-8663f938426c)
- [How did I fall in the open source world…and that was a nice thing!](https://medium.com/@priscilawebdev/how-do-i-fall-in-the-open-source-world-and-that-was-a-nice-thing-b0e85d05490d)
- [Warning and Deprecation Codes](https://github.com/verdaccio/verdaccio/blob/master/docs/warnings.md)
- [Migration Guide](https://github.com/verdaccio/verdaccio/blob/master/docs/migration-guide.md)
# Articles / Blogs / Tutorials (by Language)

View File

@@ -20,6 +20,8 @@ Below is a list of articles about Verdaccio. If you have written a blog post or
- [Setting up Verdaccio on DigitalOcean](https://medium.com/verdaccio/setting-up-verdaccio-on-digitalocean-61b5d08e4f0d)
- [How I learned React Js and how you can…](https://medium.com/verdaccio/how-i-learned-react-js-and-how-you-can-8663f938426c)
- [How did I fall in the open source world…and that was a nice thing!](https://medium.com/@priscilawebdev/how-do-i-fall-in-the-open-source-world-and-that-was-a-nice-thing-b0e85d05490d)
- [Warning and Deprecation Codes](https://github.com/verdaccio/verdaccio/blob/master/docs/warnings.md)
- [Migration Guide](https://github.com/verdaccio/verdaccio/blob/master/docs/migration-guide.md)
# Articles / Blogs / Tutorials (by Language)

View File

@@ -21,8 +21,6 @@ To change the behavior on runtime on running the image, these are the list of av
Enables gracefully shutdown, more info at the [pull request #2121](https://github.com/verdaccio/verdaccio/pull/2121).
>
### VERDACCIO_PUBLIC_URL {#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.
@@ -60,6 +58,10 @@ $ VERDACCIO_FORWARDED_PROTO=CloudFront-Forwarded-Proto verdaccio --listen 5000
By default, the storage is taken from config file, but using this variable allows to set it from environment variable.
### VERDACCIO_STORAGE_NAME
The database name for `@verdaccio/local-storage` is by default `.verdaccio-db.json`, but this can be update by using this variable.
### EXPERIMENTAL_VERDACCIO_LOGGER_COLORS {#logger-colors}
Overrides `logs.colors` from the `config.yaml`.

View File

@@ -51,9 +51,9 @@ pnpm install -g verdaccio
![install verdaccio](/img/install_verdaccio.gif)
### Next major release (verdaccio 6 alpha) {#next-major-release}
### Next Major Release (Verdaccio 7) {#next-major-release}
Next [major release is under development](https://github.com/verdaccio/verdaccio/discussions/2970), byt can try it out already, either for testing purposes or helping to catch any possible bug, if you find something report it under the label [6.x bugs](https://github.com/verdaccio/verdaccio/labels/6.x%20bugs).
Next [major release is under development](https://github.com/verdaccio/verdaccio/discussions/2970). You can try it out already, either for testing purposes, or for helping to catch any possible bug. If you find something, report it under the label [`7.x branch (next)`](https://github.com/verdaccio/verdaccio/issues?q=is%3Aopen+is%3Aissue+label%3A%227.x+branch+%28next%29%22).
```bash
npm install -g verdaccio@7-next
@@ -65,7 +65,13 @@ or with the docker image
docker pull verdaccio/verdaccio:nightly-master
```
> The docker image `verdaccio/verdaccio:nightly-master` is alinged with the latest commits in master branch, while the npmjs version has a longer release cycle. **It is highly recommended don't use alpha versions for production**.
> The docker image `verdaccio/verdaccio:nightly-master` is alinged with the latest commits in `master` branch, while the npmjs version has a longer release cycle. **It is highly recommended to not use alpha versions for production**.
## Migration Guides
The migration from Verdaccio v5/v6 to v7 contains breaking changes. Refer to the preliminary [migration guide](https://github.com/verdaccio/verdaccio/blob/master/docs/migration-v5-to-v6.md) for more information.
For migrations from older versions to v5/6 refer to the [v5 migration guide](https://verdaccio.org/blog/2021/04/14/verdaccio-5-migration-guide/).
## Basic Usage {#basic-usage}