funtask 如何使用verdaccio私有仓库

1. 进入官网 https://funtask.site 下载客户端

 安装一直点击下一步即可

2. 安装后点击桌面右下角的悬浮球,依次找到 菜单 / 设置

 

 

 3. 点开应用私有模式,输入verdaccio地址


verdaccio安装(以centeros为例)

1. 在服务器上安装node环境

yum -y install nodejs

2. 通过npm全局安装verdaccio

npm install --global verdaccio

3. 创建一份verdaccio的配置文件,并命名为config.yaml

#
# This is the default config file. It allows all users to do anything,
# so don't use it on production systems.
#
# Look here for more config file examples:
# https://github.com/verdaccio/verdaccio/tree/master/conf
#

# 包目录
storage:             ./storage
# 插件目录
plugins:             ./plugins

# WebUI配置
web:
  # 是否启用
  enable:            true
  # 网站标题
  title:             verdaccio
  logo:              /mnt/verdaccio/web/logo.svg
  # 标志
  gravatar:          true
  # 范围
  # scope:           @scope
  # 包排序
  sort_packages:     asc
  primary_color:     '#563d7c'

auth:
  htpasswd:
    file:            ./htpasswd
    # Maximum amount of users allowed to register, defaults to "+inf".
    # You can set this to -1 to disable registration.
    # max_users:      1000

# 可远程同步的仓库
uplinks:
  npmjs:
    url:             https://registry.npmjs.org/

# 包设置
packages:
  '@*/*':
    # scoped packages
    access:          $all
    publish:         $authenticated
    proxy:           npmjs

  '**':
    # allow all users (including non-authenticated users) to read and
    # publish all packages
    #
    # you can specify usernames/groupnames (depending on your auth plugin)
    # and three keywords: "$all", "$anonymous", "$authenticated"
    access:          $all

    # allow all known users to publish packages
    # (anyone can register by default, remember?)
    publish:         $authenticated

    # if package is not available locally, proxy requests to 'npmjs' registry
    proxy:           npmjs

# 服务器配置
server:
  keepAliveTimeout:  60

# 中间件
middlewares:
  audit:
    enabled:         true

# 高级设置

# url 前缀
# 监听端口
listen:              4873

# 日志设置
logs:
  - {type: stdout, format: pretty, level: http}
  #- {type: file, path: verdaccio.log, level: info}

4. 启动服务,将配置文件放置在某个目录中,然后进入目录运行命令

verdaccio --config ./config.yaml

启动完成,如果没有报错的话,私有仓库就安装好了

通过访问 服务器ip + 端口 4873,如果看到下方界面,则安装成功

最后,把verdaccio的地址,设置到funtask的私有镜像仓库地址就完成了

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值