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:56] – add Docker volume is the recommended method. 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 39: | Line 42: | ||
| logs: | logs: | ||
| - {type: stdout, format: pretty, level: http} | - {type: stdout, format: pretty, level: http} | ||
| + | </ | ||
| + | |||
| + | |||
| + | <code docker> | ||
| + | docker run -it --detach \ | ||
| + | --publish 4873:4873 \ | ||
| + | --volume `pwd`/ | ||
| + | --volume `pwd`/ | ||
| + | --volume `pwd`/ | ||
| + | --name verdaccio \ | ||
| + | verdaccio/ | ||
| </ | </ | ||
| Line 45: | Line 59: | ||
| chown -R 10001:65533 / | chown -R 10001:65533 / | ||
| + | |||
| + | |||
| + | ==== Using Docker volume (recommended) ==== | ||
| [[https:// | [[https:// | ||
| - | ===== Pull from docker | + | Create volumes: |
| + | | ||
| + | docker volume create verdaccio-storage | ||
| + | |||
| + | Run with volume: | ||
| <code docker> | <code docker> | ||
| docker run -it --detach \ | docker run -it --detach \ | ||
| --publish 4873:4873 \ | --publish 4873:4873 \ | ||
| - | --volume `pwd`/conf:/verdaccio/conf \ | + | --mount source=verdaccio, |
| - | --volume `pwd`/storage:/ | + | --mount source=verdaccio-storage,target=/ |
| - | --volume `pwd`/ | + | |
| --name verdaccio \ | --name verdaccio \ | ||
| verdaccio/ | verdaccio/ | ||
| </ | </ | ||
| + | Set correct path to htpasswd file in /// | ||
| + | <code yml> | ||
| + | ... | ||
| + | auth: | ||
| + | htpasswd: | ||
| + | file: / | ||
| + | ... | ||
| + | </ | ||
| ===== Create user ===== | ===== Create user ===== | ||
| Line 65: | 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 122: | Line 153: | ||
| ====== See also ====== | ====== See also ====== | ||
| + | * [[wiki: | ||
| ====== References ====== | ====== References ====== | ||
| * https:// | * https:// | ||
wiki/verdaccio_installation.1626958599.txt.gz · Last modified: by antisa
