wiki:verdaccio_installation
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
wiki:verdaccio_installation [2021/07/01 13:03] – created antisa | wiki:verdaccio_installation [2021/07/23 13:27] (current) – [Apache reverse proxy config] antisa | ||
---|---|---|---|
Line 4: | Line 4: | ||
Create a private npm registry (repository). | Create a private npm registry (repository). | ||
- | ===== Create folder structure and conf file ===== | + | ===== Pull from docker ===== |
+ | ==== Bind mount method (for testing) ==== | ||
+ | |||
+ | Create folder structure and conf file | ||
mkdir verdaccio && cd verdaccio | mkdir verdaccio && cd verdaccio | ||
mkdir conf | mkdir conf | ||
Line 19: | Line 22: | ||
auth: | auth: | ||
htpasswd: | htpasswd: | ||
- | file: ./htpasswd | + | file: / |
uplinks: | uplinks: | ||
npmjs: | npmjs: | ||
Line 41: | Line 44: | ||
</ | </ | ||
- | ===== Pull from docker ===== | + | |
<code docker> | <code docker> | ||
docker run -it --detach \ | docker run -it --detach \ | ||
Line 52: | Line 55: | ||
</ | </ | ||
+ | We are using docker bind mount so we need to change the permissions | ||
+ | |||
+ | chown -R 10001:65533 / | ||
+ | |||
+ | |||
+ | |||
+ | ==== Using Docker volume (recommended) ==== | ||
+ | [[https:// | ||
+ | |||
+ | Create volumes: | ||
+ | docker volume create verdaccio | ||
+ | docker volume create verdaccio-storage | ||
+ | |||
+ | Run with volume: | ||
+ | <code docker> | ||
+ | docker run -it --detach \ | ||
+ | --publish 4873:4873 \ | ||
+ | --mount source=verdaccio, | ||
+ | --mount source=verdaccio-storage, | ||
+ | --name verdaccio \ | ||
+ | verdaccio/ | ||
+ | </ | ||
+ | |||
+ | Set correct path to htpasswd file in /// | ||
+ | <code yml> | ||
+ | ... | ||
+ | auth: | ||
+ | htpasswd: | ||
+ | file: / | ||
+ | ... | ||
+ | </ | ||
===== Create user ===== | ===== Create user ===== | ||
Line 59: | Line 93: | ||
===== Apache reverse proxy config ===== | ===== Apache reverse proxy config ===== | ||
+ | Enable required apache modules: | ||
+ | |||
+ | a2enmod proxy proxy_http proxy_balancer ssl rewrite | ||
<code apache> | <code apache> | ||
Line 116: | Line 153: | ||
====== See also ====== | ====== See also ====== | ||
+ | * [[wiki: | ||
====== References ====== | ====== References ====== | ||
* https:// | * https:// | ||
* https:// | * https:// | ||
+ | * https:// | ||
wiki/verdaccio_installation.1625144634.txt.gz · Last modified: 2021/07/01 13:03 by antisa