wiki:verdaccio_installation
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| wiki:verdaccio_installation [2021/07/22 12:43] – add chown command and tweak path 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 41: | Line 44: | ||
| </ | </ | ||
| - | We are using docker bind mount so we need to change the permissions | ||
| - | chown -R 10001:65533 / | ||
| - | |||
| - | ===== Pull from docker ===== | ||
| <code docker> | <code docker> | ||
| docker run -it --detach \ | docker run -it --detach \ | ||
| Line 56: | 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 63: | 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 120: | Line 153: | ||
| ====== See also ====== | ====== See also ====== | ||
| + | * [[wiki: | ||
| ====== References ====== | ====== References ====== | ||
| * https:// | * https:// | ||
wiki/verdaccio_installation.1626957812.txt.gz · Last modified: by antisa
