1
0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-11-13 03:35:52 +01:00
verdaccio/docs/env.variables.md
Juan Picado 459b6fa72b
refactor: search v1 endpoint and local-database (#2340)
* Refactor local-storage async

refactor local storage search stream

Remove async from local-storage, refactor search with streams

refactor search with undici fetch

finish search refactor

stream multiple request to single stream

refactor storage types

remove async dependency #1225

add score and refactor metadata

remove old search async

fix missing stream local data

clean up

clean up

refactor folder search

format

fix some test

fix issue on publish

filter preview

update ci

delete package folder refactor

refactor get packages methods

fix tests

fix lock file

add changeset

fix test windows

disable some test

update package json versions

* fix merge

* fix e2e cli

* restore e2e

* Update process.ts

* Update process.ts

* add improvement

* format

* Update utils.ts

* test

* test

* Update search.spec.ts

* Update search.spec.ts

* Update search.spec.ts

* test

* Update ci.yml

* clean up

* fix tests

* Update tags.ts

* Update index.spec.ts

* document changeset

* format
2021-09-08 19:06:37 +02:00

1.7 KiB

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

VERDACCIO_LEGACY_ENCRYPTION_KEY

By default, the token stores in the database, but using this variable allows to get it from memory

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, 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-storge is by default .verdaccio-db.json, but this can be update by using this variable.