mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-04-01 02:42:23 -05:00
New Crowdin translations (#823)
* New translations config.md (Spanish) docs(website): new translations * New translations config.md (Chinese Simplified) docs(website): new translations * New translations config.md (Portuguese, Brazilian) docs(website): new translations * New translations logger.md (Chinese Simplified) docs(website): new translations * New translations notifications.md (Chinese Simplified) docs(website): new translations * New translations docker.md (Spanish) docs(website): new translations * New translations config.md (Spanish) docs(website): new translations * New translations docker.md (Chinese Simplified) docs(website): new translations * New translations config.md (Chinese Simplified) docs(website): new translations * New translations docker.md (Portuguese, Brazilian) docs(website): new translations * New translations config.md (Portuguese, Brazilian) docs(website): new translations
This commit is contained in:
parent
b95aba95cb
commit
4a6383d05f
8 changed files with 143 additions and 107 deletions
|
@ -31,7 +31,7 @@ logs:
|
|||
|
||||
## Secciones
|
||||
|
||||
Las siguientes secciones explican que significa cada propiedad y las diferentes configuraciones posibles.
|
||||
The following sections explain what each property means and the different options.
|
||||
|
||||
### Almacenamiento
|
||||
|
||||
|
@ -41,9 +41,17 @@ Es la localización por defecto del almacenamiento. **Verdaccio esta basado por
|
|||
storage: ./storage
|
||||
```
|
||||
|
||||
### Autentificación
|
||||
### Plugins
|
||||
|
||||
La configuración de autenticación es hecha aquí y esta basado en `htpasswd` y viene integrada por defecto. Puedes modificar el comportamiento por defecto vía [extensiones](plugins.md). Para mas información sobre esta sección lea [la página de autentificación](auth.md).
|
||||
Is the location of the plugin directory. Useful for Docker/Kubernetes based deployments.
|
||||
|
||||
```yaml
|
||||
plugins: ./plugins
|
||||
```
|
||||
|
||||
### Authentification
|
||||
|
||||
The authentification set up is done here, the default auth is based on `htpasswd` and is built-in. You can modify this behaviour via [plugins](plugins.md). For more information about this section read the [auth page](auth.md).
|
||||
|
||||
```yaml
|
||||
auth:
|
||||
|
@ -54,7 +62,7 @@ auth:
|
|||
|
||||
### Web UI
|
||||
|
||||
Esta propiedad te permite modificar diseño del interfaz de usuario. Para mas información sobre esta sección lea [la página de Web UI](web.md).
|
||||
This properties allow you to modify the look and feel of the web UI. For more information about this section read the [web ui page](web.md).
|
||||
|
||||
```yaml
|
||||
web:
|
||||
|
@ -65,7 +73,7 @@ web:
|
|||
|
||||
### Uplinks
|
||||
|
||||
Uplinks es la habilidad del sistema para traer paquetes de registros remotos cuando los paquetes no están disponibles localmente. Para mas información sobre esta sección lea [página de uplinks](uplinks.md).
|
||||
Uplinks is the ability of the system to fetch packages from remote registries when those packages are not available locally. For more information about this section read the [uplinks page](uplinks.md).
|
||||
|
||||
```yaml
|
||||
uplinks:
|
||||
|
@ -73,9 +81,9 @@ uplinks:
|
|||
url: https://registry.npmjs.org/
|
||||
```
|
||||
|
||||
### Paquetes
|
||||
### Packages
|
||||
|
||||
Paquetes permiten al usuario como los paquetes van a ser accedido. Para mas información sobre esta sección leer [la página de paquetes](packages.md).
|
||||
Packages allow the user to control how the packages are gonna be accessed. For more information about this section read the [packages page](packages.md).
|
||||
|
||||
```yaml
|
||||
packages:
|
||||
|
@ -87,36 +95,36 @@ packages:
|
|||
|
||||
## Configuración Avanzada
|
||||
|
||||
### Publicar modo sin conexión
|
||||
### Offline Publish
|
||||
|
||||
Por defecto, `verdaccio` no permite publicar cuando el servidor esta en modo fuera de linea, este comportamiento puede ser sobrescrito cambiando el valor a *true*.
|
||||
By default `verdaccio` does not allow to publish when the client is offline, that behavior can be overridden by setting this to *true*.
|
||||
|
||||
```yaml
|
||||
publish:
|
||||
allow_offline: false
|
||||
```
|
||||
|
||||
<small>Desde: <code>verdaccio@2.3.6</code> debido a <a href="https://github.com/verdaccio/verdaccio/pull/223">#223</a></small>
|
||||
<small>Since: <code>verdaccio@2.3.6</code> due <a href="https://github.com/verdaccio/verdaccio/pull/223">#223</a></small>
|
||||
|
||||
### Prefijos URL
|
||||
### URL Prefix
|
||||
|
||||
```yaml
|
||||
url_prefix: https://dev.company.local/verdaccio/
|
||||
```
|
||||
|
||||
Desde: `verdaccio@2.3.6` debido a [#197](https://github.com/verdaccio/verdaccio/pull/197)
|
||||
Since: `verdaccio@2.3.6` due [#197](https://github.com/verdaccio/verdaccio/pull/197)
|
||||
|
||||
### Tamaño Máximo del Cuerpo
|
||||
### Max Body Size
|
||||
|
||||
Por defecto el tamaño máximo de cuerpo para un documento JSON es `10mb`, si encuentras errores tales como `"request entity too large"` puedes incrementar este valor.
|
||||
By default the maximum body size for a JSON document is `10mb`, if you run in errors as `"request entity too large"` you may increase this value.
|
||||
|
||||
```yaml
|
||||
max_body_size: 10mb
|
||||
```
|
||||
|
||||
### Puertos
|
||||
### Listen Port
|
||||
|
||||
`verdaccio` se ejecuta por defecto en el puerto `4873`. Cambiar el puerto se puede cambiar via [cli](cli.md) o en el archivo de configuración, las siguientes opciones son válidas.
|
||||
`verdaccio` runs by default in the port `4873`. Changing the port can be done via [cli](cli.md) or in the configuration file, the following options are valid.
|
||||
|
||||
```yaml
|
||||
listen:
|
||||
|
@ -130,7 +138,7 @@ listen:
|
|||
|
||||
### HTTPS
|
||||
|
||||
Para habilitar`https` en `verdaccio` es suficiente con definir en `listen` en su dominio el protocolo *https://*. Para mas información sobre esta sección leer [página de Ssl](ssl.md).
|
||||
To enable `https` in `verdaccio` it's enough to set the `listen` flag with the protocol *https://*. For more information about this section read the [ssl page](ssl.md).
|
||||
|
||||
```yaml
|
||||
https:
|
||||
|
@ -141,11 +149,11 @@ https:
|
|||
|
||||
### Proxy
|
||||
|
||||
Proxies tienen propósitos especiales en servidores HTTP diseñados para transferir datos desde servidores remotos a clientes locales.
|
||||
Proxies are special-purpose HTTP servers designed to transfer data from remote servers to local clients.
|
||||
|
||||
#### http_proxy and https_proxy
|
||||
|
||||
Si ya tienes un proxy en tu red, puedes definir el encabezado `X-Forwarded-For` usando las siguientes propiedades.
|
||||
If you have a proxy in your network you can set a `X-Forwarded-For` header using the following properties.
|
||||
|
||||
```yaml
|
||||
http_proxy: http://something.local/
|
||||
|
@ -154,16 +162,15 @@ https_proxy: https://something.local/
|
|||
|
||||
#### no_proxy
|
||||
|
||||
Esta variable debería contentener una lista de extensiones domínios separados por comas donde el proxy no debería ser usado.
|
||||
This variable should contain a comma-separated list of domain extensions proxy should not be used for.
|
||||
|
||||
```yaml
|
||||
http_proxy: http://something.local/
|
||||
https_proxy: https://something.local/
|
||||
no_proxy: localhost,127.0.0.1
|
||||
```
|
||||
|
||||
### Notificaciones
|
||||
### Notifications
|
||||
|
||||
Habilita notificaciones en aplicaciones a terceros es muy sencillo via web hooks. Para más información sobre esta sección lea [la página de notificaciones](notifications.md).
|
||||
Enabling notifications to third-party tools is fairly easy via web hooks. For more information about this section read the [notifications page](notifications.md).
|
||||
|
||||
```yaml
|
||||
notify:
|
||||
|
@ -175,11 +182,11 @@ notify:
|
|||
|
||||
> Para información detallada sobre configuración, por favor [revise el código fuente](https://github.com/verdaccio/verdaccio/tree/master/conf).
|
||||
|
||||
### Revisión
|
||||
### Audit
|
||||
|
||||
<small>Desde: <code>verdaccio@3.0.0</code></small>
|
||||
<small>Since: <code>verdaccio@3.0.0</code></small>
|
||||
|
||||
`npm audit` es un nuevo comando lanzado con [npm 6.x](https://github.com/npm/npm/releases/tag/v6.1.0). Verdaccio incluye una extensión de middleware integrada para el manejo de este comando.
|
||||
`npm audit` is a new command released with [npm 6.x](https://github.com/npm/npm/releases/tag/v6.1.0). Verdaccio includes a built-in middleware plugin to handle this command.
|
||||
|
||||
> Si tienes una nueva instalación va incluida por defecto, de otro modo necesitarás añadir las siguientes propiedades a tu archivo config
|
||||
|
||||
|
|
|
@ -56,26 +56,31 @@ El último argumento define cual imagen se usa. En la linea de abajo se descarga
|
|||
|
||||
Si has [construido una imagen localmente](#build-your-own-docker-image) usa `verdaccio` como el último argumento.
|
||||
|
||||
You can use `-v` to bind mount `conf` and `storage` to the hosts filesystem:
|
||||
You can use `-v` to bind mount `conf`, `storage` and `plugins` to the hosts filesystem:
|
||||
|
||||
```bash
|
||||
V_PATH=/path/for/verdaccio; docker run -it --rm --name verdaccio -p 4873:4873 \
|
||||
-v $V_PATH/conf:/verdaccio/conf \
|
||||
-v $V_PATH/storage:/verdaccio/storage \
|
||||
-v $V_PATH/plugins:/verdaccio/plugins \
|
||||
verdaccio/verdaccio
|
||||
```
|
||||
|
||||
> Note: Verdaccio runs as a non-root user (uid=100, gid=101) inside the container, if you use bind mount to override default, you need to make sure the mount directory is assigned to the right user. En el ejemplo de arriba, necesitas ejecutar `sudo chown -R 100:101 /opt/verdaccio` de lo contrario, obtendrás errores de permiso en tiempo de ejecución. [Usar el volumen docker](https://docs.docker.com/storage/volumes/) es recomendado antes que usar el montaje de unión.
|
||||
|
||||
### Usar un puerto personalizado con Docker
|
||||
### Plugins
|
||||
|
||||
Cualquier `host:port` configurado en `conf/config.yaml` bajo `listen` es ignorado al usar docker.
|
||||
Plugins can be installed in a separate directory and mounted using Docker or Kubernetes, however make sure you build plugins with native dependencies using the same base image as the Verdaccio Dockerfile.
|
||||
|
||||
Si quieres alcanzar la instancia de docker de verdaccio bajo un puerto diferente, digamos `5000` en tu comando `docker run` remplaza `-p 4873:4873` con `-p 5000:4873`.
|
||||
### Docker and custom port configuration
|
||||
|
||||
En caso de que necesites especificar cuál puerto escuchar **en el contenedor docker**, desde la versión 2.?.? puedes hacerlo al proveer argumentos adicionales a `docker run`: `--env PORT=5000` Esto cambia cual puerto el contenedor docker muestra y el puerto que verdaccio escucha.
|
||||
Any `host:port` configured in `conf/config.yaml` under `listen` is currently ignored when using docker.
|
||||
|
||||
Por supuesto que los número que le das al parámetro `-p` necesitan coincidir, así que asumiendo que quieres que todos sean iguales, esto es lo que pudieses copiar, pegar y adoptar:
|
||||
If you want to reach verdaccio docker instance under different port, lets say `5000` in your `docker run` command replace `-p 4873:4873` with `-p 5000:4873`.
|
||||
|
||||
In case you need to specify which port to listen to **in the docker container**, since version 2.?.? you can do so by providing additional arguments to `docker run`: `--env PORT=5000` This changes which port the docker container exposes and the port verdaccio listens to.
|
||||
|
||||
Of course the numbers you give to `-p` paremeter need to match, so assuming you want them to all be the same this is what you could copy, paste and adopt:
|
||||
|
||||
```bash
|
||||
PORT=5000; docker run -it --rm --name verdaccio \
|
||||
|
@ -83,9 +88,9 @@ PORT=5000; docker run -it --rm --name verdaccio \
|
|||
verdaccio/verdaccio
|
||||
```
|
||||
|
||||
### Configura Docker con HTTPS
|
||||
### Using HTTPS with Docker
|
||||
|
||||
Puedes configurar el protocolo que verdaccio va a escuchar, similar a la configuración de puerto. Tienes que sobre escribir el valor por defecto ("http") de la variable del entorno `PROTOCOL` a "https", luego de haber especificado los certificados en config.yaml.
|
||||
You can configure the protocol verdaccio is going to listen on, similarly to the port configuration. You have to overwrite the default value("http") of the `PROTOCOL` environment variable to "https", after you specified the certificates in the config.yaml.
|
||||
|
||||
```bash
|
||||
PROTOCOL=https; docker run -it --rm --name verdaccio \
|
||||
|
@ -93,7 +98,7 @@ PROTOCOL=https; docker run -it --rm --name verdaccio \
|
|||
verdaccio/verdaccio
|
||||
```
|
||||
|
||||
### Usando docker-compose
|
||||
### Using docker-compose
|
||||
|
||||
1. Obtén la última versión de [docker-compose](https://github.com/docker/compose).
|
||||
2. Construye y ejecuta el contenedor:
|
||||
|
@ -102,9 +107,9 @@ PROTOCOL=https; docker run -it --rm --name verdaccio \
|
|||
$ docker-compose up --build
|
||||
```
|
||||
|
||||
Puedes configurar el puerto a usar (tanto para el contenedor como para el cliente) al anteponer el comando anterior con `PORT=5000`.
|
||||
You can set the port to use (for both container and host) by prefixing the above command with `PORT=5000`.
|
||||
|
||||
Docker generará un volumen con nombre en el cual se almacenan datos de aplicación persistente. Puedes usar `docker inspect` ó `docker volume inspect` para revelar la ubicación física del volumen y editar la configuración, tal como:
|
||||
Docker will generate a named volume in which to store persistent application data. You can use `docker inspect` or `docker volume inspect` to reveal the physical location of the volume and edit the configuration, such as:
|
||||
|
||||
$ docker volume inspect verdaccio_verdaccio
|
||||
[
|
||||
|
@ -125,25 +130,25 @@ Docker generará un volumen con nombre en el cual se almacenan datos de aplicaci
|
|||
docker build -t verdaccio .
|
||||
```
|
||||
|
||||
Existe también un script npm para construir la imagen docker, para que también puedas hacer:
|
||||
There is also an npm script for building the docker image, so you can also do:
|
||||
|
||||
```bash
|
||||
npm run build:docker
|
||||
```
|
||||
|
||||
Nota: La primera construcción toma algunos minutos en llevarse a cabo porque necesita ejecutar el `npm install`, y tomará el mismo tiempo cada vez que cambies cualquier archivo que no esté listado en `.dockerignore`.
|
||||
Note: The first build takes some minutes to build because it needs to run `npm install`, and it will take that long again whenever you change any file that is not listed in `.dockerignore`.
|
||||
|
||||
Si quieres usar la imagen docker en un rpi o en un dispositivo compatible, también existe un dockerfile disponible. Para construir la imagen docker para raspberry pi ejecute:
|
||||
If you want to use the docker image on a rpi or a compatible device there is also a dockerfile available. To build the docker image for raspberry pi execute:
|
||||
|
||||
```bash
|
||||
npm run build:docker:rpi
|
||||
```
|
||||
|
||||
Por favor note que para cualquier comando docker de arriba, necesitas tener un docker instalado en tu máquina y el docker ejecutable debe estar disponible en tu `$PATH`.
|
||||
Please note that for any of the above docker commands you need to have docker installed on your machine and the docker executable should be available on your `$PATH`.
|
||||
|
||||
## Ejemplos con Docker
|
||||
|
||||
Existe un repositorio separado que aloja múltiples configuraciones para componer imágenes Docker con `verdaccio`, por ejemplo, como proxy inverso:
|
||||
There is a separate repository that hosts multiple configurations to compose Docker images with `verdaccio`, for instance, as reverse proxy:
|
||||
|
||||
<https://github.com/verdaccio/docker-examples>
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ logs:
|
|||
|
||||
## Seções
|
||||
|
||||
The following sections explain what means each property and the different options.
|
||||
The following sections explain what each property means and the different options.
|
||||
|
||||
### Storage
|
||||
|
||||
|
@ -41,6 +41,14 @@ Is the location of the default storage. **Verdaccio is by default based on local
|
|||
storage: ./storage
|
||||
```
|
||||
|
||||
### Plugins
|
||||
|
||||
Is the location of the plugin directory. Useful for Docker/Kubernetes based deployments.
|
||||
|
||||
```yaml
|
||||
plugins: ./plugins
|
||||
```
|
||||
|
||||
### Authentification
|
||||
|
||||
The authentification set up is done here, the default auth is based on `htpasswd` and is built-in. You can modify this behaviour via [plugins](plugins.md). For more information about this section read the [auth page](auth.md).
|
||||
|
@ -75,7 +83,7 @@ uplinks:
|
|||
|
||||
### Packages
|
||||
|
||||
Packages allow the user how the packages are gonna be accessed. For more information about this section read the [packages page](packages.md).
|
||||
Packages allow the user to control how the packages are gonna be accessed. For more information about this section read the [packages page](packages.md).
|
||||
|
||||
```yaml
|
||||
packages:
|
||||
|
@ -89,7 +97,7 @@ packages:
|
|||
|
||||
### Offline Publish
|
||||
|
||||
By default `verdaccio` does not allow to publish when the client is offline, that behavior can be overridden set it in to *true*.
|
||||
By default `verdaccio` does not allow to publish when the client is offline, that behavior can be overridden by setting this to *true*.
|
||||
|
||||
```yaml
|
||||
publish:
|
||||
|
@ -116,7 +124,7 @@ max_body_size: 10mb
|
|||
|
||||
### Listen Port
|
||||
|
||||
`verdaccio` runs by default in the port `4873`. Change the port can be done via [cli](cli.md) or in the configuration file, the following options are valid.
|
||||
`verdaccio` runs by default in the port `4873`. Changing the port can be done via [cli](cli.md) or in the configuration file, the following options are valid.
|
||||
|
||||
```yaml
|
||||
listen:
|
||||
|
@ -130,7 +138,7 @@ listen:
|
|||
|
||||
### HTTPS
|
||||
|
||||
To enable `https` in `verdaccio` enough with set your `listen` domain with the protocol *https://*. For more information about this section read the [ssl page](ssl.md).
|
||||
To enable `https` in `verdaccio` it's enough to set the `listen` flag with the protocol *https://*. For more information about this section read the [ssl page](ssl.md).
|
||||
|
||||
```yaml
|
||||
https:
|
||||
|
@ -157,13 +165,12 @@ https_proxy: https://something.local/
|
|||
This variable should contain a comma-separated list of domain extensions proxy should not be used for.
|
||||
|
||||
```yaml
|
||||
http_proxy: http://something.local/
|
||||
https_proxy: https://something.local/
|
||||
no_proxy: localhost,127.0.0.1
|
||||
```
|
||||
|
||||
### Notifications
|
||||
|
||||
Enable notifications to three party tools is fairly easy via web hooks. For more information about this section read the [notifications page](notifications.md).
|
||||
Enabling notifications to third-party tools is fairly easy via web hooks. For more information about this section read the [notifications page](notifications.md).
|
||||
|
||||
```yaml
|
||||
notify:
|
||||
|
|
|
@ -56,17 +56,22 @@ The last argument defines which image to use. The above line will pull the lates
|
|||
|
||||
If you have [build an image locally](#build-your-own-docker-image) use `verdaccio` as the last argument.
|
||||
|
||||
You can use `-v` to bind mount `conf` and `storage` to the hosts filesystem:
|
||||
You can use `-v` to bind mount `conf`, `storage` and `plugins` to the hosts filesystem:
|
||||
|
||||
```bash
|
||||
V_PATH=/path/for/verdaccio; docker run -it --rm --name verdaccio -p 4873:4873 \
|
||||
-v $V_PATH/conf:/verdaccio/conf \
|
||||
-v $V_PATH/storage:/verdaccio/storage \
|
||||
-v $V_PATH/plugins:/verdaccio/plugins \
|
||||
verdaccio/verdaccio
|
||||
```
|
||||
|
||||
> Note: Verdaccio runs as a non-root user (uid=100, gid=101) inside the container, if you use bind mount to override default, you need to make sure the mount directory is assigned to the right user. In above example, you need to run `sudo chown -R 100:101 /opt/verdaccio` otherwise you will get permission errors at runtime. [Use docker volume](https://docs.docker.com/storage/volumes/) is recommended over using bind mount.
|
||||
|
||||
### Plugins
|
||||
|
||||
Plugins can be installed in a separate directory and mounted using Docker or Kubernetes, however make sure you build plugins with native dependencies using the same base image as the Verdaccio Dockerfile.
|
||||
|
||||
### Docker and custom port configuration
|
||||
|
||||
Any `host:port` configured in `conf/config.yaml` under `listen` is currently ignored when using docker.
|
||||
|
|
|
@ -31,7 +31,7 @@ logs:
|
|||
|
||||
## 模块
|
||||
|
||||
以下各章节解释了每一个选项的作用和可用的值
|
||||
The following sections explain what each property means and the different options.
|
||||
|
||||
### 存储
|
||||
|
||||
|
@ -41,9 +41,17 @@ logs:
|
|||
storage: ./storage
|
||||
```
|
||||
|
||||
### 认证
|
||||
### Plugins
|
||||
|
||||
在这里完成授权设置,默认授权是基于`htpasswd` 并且是内置的。 您可以通过 [ 插件 ](plugins.md) 修改此行为。 如需了解更多信息,请阅读文档中的 ["认证" 部分](auth.md)
|
||||
Is the location of the plugin directory. Useful for Docker/Kubernetes based deployments.
|
||||
|
||||
```yaml
|
||||
plugins: ./plugins
|
||||
```
|
||||
|
||||
### Authentification
|
||||
|
||||
The authentification set up is done here, the default auth is based on `htpasswd` and is built-in. You can modify this behaviour via [plugins](plugins.md). For more information about this section read the [auth page](auth.md).
|
||||
|
||||
```yaml
|
||||
auth:
|
||||
|
@ -54,7 +62,7 @@ auth:
|
|||
|
||||
### Web UI
|
||||
|
||||
这个选项允许你定制 Web UI 的外观. 如需了解更多信息,请阅读文档中的 ["Web UI" 部分](web.md).
|
||||
This properties allow you to modify the look and feel of the web UI. For more information about this section read the [web ui page](web.md).
|
||||
|
||||
```yaml
|
||||
web:
|
||||
|
@ -65,7 +73,7 @@ web:
|
|||
|
||||
### Uplinks
|
||||
|
||||
通过配置 Uplinks ,Verdaccio 可以从远程的仓库中获取本地尚未缓存的包。 如需了解更多信息,请阅读文档中的 ["Uplinks" 部分](uplinks.md)
|
||||
Uplinks is the ability of the system to fetch packages from remote registries when those packages are not available locally. For more information about this section read the [uplinks page](uplinks.md).
|
||||
|
||||
```yaml
|
||||
uplinks:
|
||||
|
@ -73,9 +81,9 @@ uplinks:
|
|||
url: https://registry.npmjs.org/
|
||||
```
|
||||
|
||||
### 包
|
||||
### Packages
|
||||
|
||||
"包" 部分定义了用户访问仓库中的包的权限。如需了解更多信息,请阅读文档中的 [ "包" 部分](packages.md).
|
||||
Packages allow the user to control how the packages are gonna be accessed. For more information about this section read the [packages page](packages.md).
|
||||
|
||||
```yaml
|
||||
packages:
|
||||
|
@ -87,9 +95,9 @@ packages:
|
|||
|
||||
## 高级设置
|
||||
|
||||
### 离线发布
|
||||
### Offline Publish
|
||||
|
||||
`Verdaccio` 默认不允许在与 Uplinks 断开连接后发布任何包,但是通过设置以下选项为 *true* 来允许离线发布。
|
||||
By default `verdaccio` does not allow to publish when the client is offline, that behavior can be overridden by setting this to *true*.
|
||||
|
||||
```yaml
|
||||
publish:
|
||||
|
@ -98,7 +106,7 @@ publish:
|
|||
|
||||
<small>Since: <code>verdaccio@2.3.6</code> due <a href="https://github.com/verdaccio/verdaccio/pull/223">#223</a></small>
|
||||
|
||||
### URL 前缀
|
||||
### URL Prefix
|
||||
|
||||
```yaml
|
||||
url_prefix: https://dev.company.local/verdaccio/
|
||||
|
@ -106,17 +114,17 @@ url_prefix: https://dev.company.local/verdaccio/
|
|||
|
||||
Since: `verdaccio@2.3.6` due [#197](https://github.com/verdaccio/verdaccio/pull/197)
|
||||
|
||||
### 最大正文大小
|
||||
### Max Body Size
|
||||
|
||||
默认的 JSON 文件最大正文大小是`10mb`, 如果遇到`“请求实体太大”`的错误,您可以增大此数值。
|
||||
By default the maximum body size for a JSON document is `10mb`, if you run in errors as `"request entity too large"` you may increase this value.
|
||||
|
||||
```yaml
|
||||
max_body_size: 10mb
|
||||
```
|
||||
|
||||
### 监听端口
|
||||
### Listen Port
|
||||
|
||||
`Verdaccio` 默认使用 `4873` 端口. 可以通过 [命令行传递参数](cli.md) 或修改配置文件,以下格式是有效的。
|
||||
`verdaccio` runs by default in the port `4873`. Changing the port can be done via [cli](cli.md) or in the configuration file, the following options are valid.
|
||||
|
||||
```yaml
|
||||
listen:
|
||||
|
@ -130,7 +138,7 @@ listen:
|
|||
|
||||
### HTTPS
|
||||
|
||||
可通过在 `listen` 的域名前增加 *https://* 并设置证书路径来启用 `Verdaccio` 的 HTTPS 支持。 如需了解更多信息,请阅读文档中的 ["SSL" 部分](ssl.md)
|
||||
To enable `https` in `verdaccio` it's enough to set the `listen` flag with the protocol *https://*. For more information about this section read the [ssl page](ssl.md).
|
||||
|
||||
```yaml
|
||||
https:
|
||||
|
@ -139,13 +147,13 @@ https:
|
|||
ca: ./path/verdaccio-csr.pem
|
||||
```
|
||||
|
||||
### 代理服务器
|
||||
### Proxy
|
||||
|
||||
代理服务器是专门把数据从远程服务器传输到本地客户端的HTTP 服务器。
|
||||
Proxies are special-purpose HTTP servers designed to transfer data from remote servers to local clients.
|
||||
|
||||
#### http_proxy and https_proxy
|
||||
|
||||
如果您的网络里有代理服务器,您可以使用以下属性来设置`X-Forwarded-For`页眉。
|
||||
If you have a proxy in your network you can set a `X-Forwarded-For` header using the following properties.
|
||||
|
||||
```yaml
|
||||
http_proxy: http://something.local/
|
||||
|
@ -154,16 +162,15 @@ https_proxy: https://something.local/
|
|||
|
||||
#### no_proxy
|
||||
|
||||
此变量应该包含一个代理服务器不应该被用到的,以逗号分隔的域名扩展列表。
|
||||
This variable should contain a comma-separated list of domain extensions proxy should not be used for.
|
||||
|
||||
```yaml
|
||||
http_proxy: http://something.local/
|
||||
https_proxy: https://something.local/
|
||||
no_proxy: localhost,127.0.0.1
|
||||
```
|
||||
|
||||
### 通知
|
||||
### Notifications
|
||||
|
||||
使用web hooks来启用三方工具通知是非常容易的。如需了解更多此部分的内容,请阅读[通知页面](notifications.md)。
|
||||
Enabling notifications to third-party tools is fairly easy via web hooks. For more information about this section read the [notifications page](notifications.md).
|
||||
|
||||
```yaml
|
||||
notify:
|
||||
|
@ -175,11 +182,11 @@ notify:
|
|||
|
||||
> 有关更多配置设置的详细信息,请[核对源代码](https://github.com/verdaccio/verdaccio/tree/master/conf)。
|
||||
|
||||
### 审核
|
||||
### Audit
|
||||
|
||||
<small>Since: <code>verdaccio@3.0.0</code></small>
|
||||
|
||||
`npm audit` 是和[npm 6.x](https://github.com/npm/npm/releases/tag/v6.1.0) 一起发布的新命令。Verdaccio 包含一个内置的middleware (中间体)插件来处理此命令。
|
||||
`npm audit` is a new command released with [npm 6.x](https://github.com/npm/npm/releases/tag/v6.1.0). Verdaccio includes a built-in middleware plugin to handle this command.
|
||||
|
||||
> 新安装采用默认版本,但是您可以添加以下代码段到配置文件中
|
||||
|
||||
|
|
|
@ -56,26 +56,31 @@ docker run -it --rm --name verdaccio -p 4873:4873 verdaccio/verdaccio
|
|||
|
||||
如果您已经用 `verdaccio`作为最后参数[在本地创建一个镜像](#build-your-own-docker-image)。
|
||||
|
||||
您可以用`-v`来绑定安装 `conf`和`storage`到主机文件系统中:
|
||||
You can use `-v` to bind mount `conf`, `storage` and `plugins` to the hosts filesystem:
|
||||
|
||||
```bash
|
||||
V_PATH=/path/for/verdaccio; docker run -it --rm --name verdaccio -p 4873:4873 \
|
||||
-v $V_PATH/conf:/verdaccio/conf \
|
||||
-v $V_PATH/storage:/verdaccio/storage \
|
||||
-v $V_PATH/plugins:/verdaccio/plugins \
|
||||
verdaccio/verdaccio
|
||||
```
|
||||
|
||||
> 请注意:Verdaccio 在容器内是作为non-root 用户端 (uid=100, gid=101) 运行, 如果您使用绑定安装来覆盖默认设置, 您需要确保安装目录是被指定到正确的用户端。 在上面的示例里,您要运行 `sudo chown -R 100:101 /opt/verdaccio`,否则在运行的时候您会得到权限错误提醒。 推荐[使用docker卷(volume)](https://docs.docker.com/storage/volumes/)来替代绑定安装。
|
||||
|
||||
### Docker和自定义端口配置
|
||||
### Plugins
|
||||
|
||||
在使用docker 的时候,当前任何在`listen` 下的`conf/config.yaml` 里配置的`host:port`都将被忽略。
|
||||
Plugins can be installed in a separate directory and mounted using Docker or Kubernetes, however make sure you build plugins with native dependencies using the same base image as the Verdaccio Dockerfile.
|
||||
|
||||
如果您要在不同端口下获得 verdaccio docker 实例,比如 `docker run` 命令里的`5000`,您可以用 `-p 5000:4873`取代 `-p 4873:4873` 。
|
||||
### Docker and custom port configuration
|
||||
|
||||
从版本2.?.? 开始,如果您需要指定**docker容器**内特定监听端口, 您可以通过提供额外参数给`docker run`: `--env PORT=5000`来达成。这会改变docker容器显示的端口以及 verdaccio要监听的端口。
|
||||
Any `host:port` configured in `conf/config.yaml` under `listen` is currently ignored when using docker.
|
||||
|
||||
当然您给出的 `-p` 参数数字必须吻合,因此,假设您希望他们全都一样,您可以复制,黏贴和采用以下代码:
|
||||
If you want to reach verdaccio docker instance under different port, lets say `5000` in your `docker run` command replace `-p 4873:4873` with `-p 5000:4873`.
|
||||
|
||||
In case you need to specify which port to listen to **in the docker container**, since version 2.?.? you can do so by providing additional arguments to `docker run`: `--env PORT=5000` This changes which port the docker container exposes and the port verdaccio listens to.
|
||||
|
||||
Of course the numbers you give to `-p` paremeter need to match, so assuming you want them to all be the same this is what you could copy, paste and adopt:
|
||||
|
||||
```bash
|
||||
PORT=5000; docker run -it --rm --name verdaccio \
|
||||
|
@ -83,9 +88,9 @@ PORT=5000; docker run -it --rm --name verdaccio \
|
|||
verdaccio/verdaccio
|
||||
```
|
||||
|
||||
### HTTPS 和Docker一起使用
|
||||
### Using HTTPS with Docker
|
||||
|
||||
您可以配置verdaccio要监听的协议,类似于端口配置。 当您在config.yaml里指定证书后,您必须用 "https"覆盖`PROTOCOL` 环境变量的默认值 ("http") 。
|
||||
You can configure the protocol verdaccio is going to listen on, similarly to the port configuration. You have to overwrite the default value("http") of the `PROTOCOL` environment variable to "https", after you specified the certificates in the config.yaml.
|
||||
|
||||
```bash
|
||||
PROTOCOL=https; docker run -it --rm --name verdaccio \
|
||||
|
@ -93,7 +98,7 @@ PROTOCOL=https; docker run -it --rm --name verdaccio \
|
|||
verdaccio/verdaccio
|
||||
```
|
||||
|
||||
### 使用docker-compose
|
||||
### Using docker-compose
|
||||
|
||||
1. 获取[docker-compose](https://github.com/docker/compose)的最新版本。
|
||||
2. 创建并运行容器:
|
||||
|
@ -102,9 +107,9 @@ PROTOCOL=https; docker run -it --rm --name verdaccio \
|
|||
$ docker-compose up --build
|
||||
```
|
||||
|
||||
您可以添加`PORT=5000`到以上命令的前面来设置要使用(容器和主机)的端口。
|
||||
You can set the port to use (for both container and host) by prefixing the above command with `PORT=5000`.
|
||||
|
||||
Docker将生成一个用于存储持续应用程序数据的命名卷(named volume)。 您可以使用 `docker inspect` 或者 `docker volume inspect` 来查看此卷(volume) 的物理位置并编辑配置,比如:
|
||||
Docker will generate a named volume in which to store persistent application data. You can use `docker inspect` or `docker volume inspect` to reveal the physical location of the volume and edit the configuration, such as:
|
||||
|
||||
$ docker volume inspect verdaccio_verdaccio
|
||||
[
|
||||
|
@ -125,25 +130,25 @@ Docker将生成一个用于存储持续应用程序数据的命名卷(named volu
|
|||
docker build -t verdaccio .
|
||||
```
|
||||
|
||||
还有一个创建 docker镜像的npm 脚本,因此您还可以执行以下操作:
|
||||
There is also an npm script for building the docker image, so you can also do:
|
||||
|
||||
```bash
|
||||
npm run build:docker
|
||||
```
|
||||
|
||||
请注意: 第一个创建的镜像要花几分钟时间,因为它需要运行 `npm install`, 而且,如果您更改任何未在`.dockerignore`列表里的文件,它也将会运行相同的时间。
|
||||
Note: The first build takes some minutes to build because it needs to run `npm install`, and it will take that long again whenever you change any file that is not listed in `.dockerignore`.
|
||||
|
||||
如果您要在rpi或者兼容设备上使用docker镜像,也有现有的dockerfile。要生成raspberry pi(树莓派)的docker镜像,需要执行:
|
||||
If you want to use the docker image on a rpi or a compatible device there is also a dockerfile available. To build the docker image for raspberry pi execute:
|
||||
|
||||
```bash
|
||||
npm run build:docker:rpi
|
||||
```
|
||||
|
||||
请注意, 以上所有docker命令都要求您的机台上安装docker, 而且docker 执行项必须在您的`$PATH`里。
|
||||
Please note that for any of the above docker commands you need to have docker installed on your machine and the docker executable should be available on your `$PATH`.
|
||||
|
||||
## Docker示例
|
||||
|
||||
有个分开的资源库可以承载多个配置来用`verdaccio`生成Docker镜像, 比如,reverse proxy(反向代理服务器):
|
||||
There is a separate repository that hosts multiple configurations to compose Docker images with `verdaccio`, for instance, as reverse proxy:
|
||||
|
||||
<https://github.com/verdaccio/docker-examples>
|
||||
|
||||
|
|
|
@ -16,9 +16,9 @@ logs:
|
|||
|
||||
### 配置
|
||||
|
||||
| 属性 | 类型 | 必填 | 范例 | 支持 | 描述 |
|
||||
| -- | --- | -- | ---------------------------------------------- | ---- | ----------------- |
|
||||
| 类型 | 字符串 | 不 | [stdout, file] | 任意路径 | 定义输出 |
|
||||
| 路径 | 字符串 | 不 | verdaccio.log | 任意路径 | 如果类型为文件,请定义该文件的位置 |
|
||||
| 格式 | 字符串 | 不 | [pretty, pretty-timestamped] | 任意路径 | 输出格式 |
|
||||
| 级别 | 字符串 | 不 | [fatal, error, warn, http, info, debug, trace] | 任意路径 | 详细级别 |
|
||||
| 属性 | 类型 | 必填 | 范例 | 支持 | 描述 |
|
||||
| ------ | ------ | -- | ---------------------------------------------- | --- | ----------------- |
|
||||
| type | string | No | [stdout, file] | all | 定义输出 |
|
||||
| path | string | No | verdaccio.log | all | 如果类型为文件,请定义该文件的位置 |
|
||||
| format | string | No | [pretty, pretty-timestamped] | all | 输出格式 |
|
||||
| level | string | No | [fatal, error, warn, http, info, debug, trace] | all | 详细级别 |
|
|
@ -148,11 +148,11 @@ notify:
|
|||
|
||||
## 配置
|
||||
|
||||
| 属性 | 类型 | 必填 | 支持 | 默认 | 描述 |
|
||||
| ------------------- | ----- | -- | ---- | -- | ------------------------------------------- |
|
||||
| 方法 | 字符串 | 不 | 任意路径 | | HTTP verb |
|
||||
| packagePattern | 字符串 | 不 | 任意路径 | | 仅当包名字和正规表达式匹配时才运行此通知 |
|
||||
| packagePatternFlags | 字符串 | 不 | 任意路径 | | 任何与正规表达式一起使用的标记 |
|
||||
| 标头 | 数组/对象 | 是 | 任意路径 | | 如果此端点需要特定的标头,请把它们设置为键数组:value objects(值对象)。 |
|
||||
| 端点 | 字符串 | 是 | 任意路径 | | 设置此调用的URL 端点 |
|
||||
| 内容 | 字符串 | 是 | 任意路径 | | 任何[Handlebar](https://handlebarsjs.com/)表达式 |
|
||||
| 属性 | 类型 | 必填 | 支持 | 默认 | 描述 |
|
||||
| ------------------- | ------------ | --- | --- | -- | ------------------------------------------- |
|
||||
| method | string | No | all | | HTTP verb |
|
||||
| packagePattern | string | No | all | | 仅当包名字和正规表达式匹配时才运行此通知 |
|
||||
| packagePatternFlags | string | No | all | | 任何与正规表达式一起使用的标记 |
|
||||
| headers | array/object | Yes | all | | 如果此端点需要特定的标头,请把它们设置为键数组:value objects(值对象)。 |
|
||||
| endpoint | string | Yes | all | | 设置此调用的URL 端点 |
|
||||
| content | string | Yes | all | | 任何[Handlebar](https://handlebarsjs.com/)表达式 |
|
Loading…
Add table
Reference in a new issue