diff --git a/apps/verdaccio/7.1.1/.env.sample b/apps/verdaccio/7.1.1/.env.sample new file mode 100644 index 000000000..260b75117 --- /dev/null +++ b/apps/verdaccio/7.1.1/.env.sample @@ -0,0 +1,9 @@ +CONFIG_PATH="./data/config" +CONTAINER_NAME="verdaccio" +PANEL_APP_PORT_HTTP=40087 +PLUGINS_PATH="./data/plugins" +STORAGE_PATH="./data/storage" +VERDACCIO_APPDIR="/opt/verdaccio" +VERDACCIO_PROTOCOL="http" +VERDACCIO_USER_NAME="verdaccio" +VERDACCIO_USER_UID=10001 diff --git a/apps/verdaccio/7.1.1/data.yml b/apps/verdaccio/7.1.1/data.yml new file mode 100644 index 000000000..c30e7949e --- /dev/null +++ b/apps/verdaccio/7.1.1/data.yml @@ -0,0 +1,131 @@ +additionalProperties: + formFields: + - default: "40087" + edit: true + envKey: PANEL_APP_PORT_HTTP + labelEn: Port + labelZh: 端口 + label: + en: 'Port' + zh: '端口' + zh-Hant: '埠' + ja: 'ポート' + ko: '포트' + ru: 'Порт' + ms: 'Port' + pt-br: 'Porta' + required: true + rule: paramPort + type: number + - default: "./data/storage" + disabled: true + envKey: STORAGE_PATH + labelEn: Storage Path + labelZh: 存储路径 + label: + en: 'Storage Path' + zh: '存储路径' + zh-Hant: '儲存路徑' + ja: 'ストレージパス' + ko: '스토리지 경로' + ru: 'Путь хранилища' + ms: 'Laluan storan' + pt-br: 'Caminho de armazenamento' + required: true + type: text + - default: "./data/config" + disabled: true + envKey: CONFIG_PATH + labelEn: Config Path + labelZh: 配置路径 + label: + en: 'Config Path' + zh: '配置路径' + zh-Hant: '設定路徑' + ja: '設定パス' + ko: '구성 경로' + ru: 'Путь к конфигурации' + ms: 'Laluan konfigurasi' + pt-br: 'Caminho de configuração' + required: true + type: text + - default: "./data/plugins" + disabled: true + envKey: PLUGINS_PATH + labelEn: Plugins Path + labelZh: 插件路径 + label: + en: 'Plugins Path' + zh: '插件路径' + zh-Hant: '外掛路徑' + ja: 'プラグインパス' + ko: '플러그인 경로' + ru: 'Путь к плагинам' + ms: 'Laluan pemalam' + pt-br: 'Caminho dos plugins' + required: true + type: text + - default: "/opt/verdaccio" + disabled: true + envKey: VERDACCIO_APPDIR + labelEn: App Directory + labelZh: 应用目录 + label: + en: 'App Directory' + zh: '应用目录' + zh-Hant: '應用目錄' + ja: 'アプリディレクトリ' + ko: '앱 디렉터리' + ru: 'Каталог приложения' + ms: 'Direktori aplikasi' + pt-br: 'Diretório do aplicativo' + required: true + type: text + - default: "verdaccio" + edit: true + envKey: VERDACCIO_USER_NAME + labelEn: User Name + labelZh: 用户名 + label: + en: 'User Name' + zh: '用户名' + zh-Hant: '使用者名稱' + ja: 'ユーザー名' + ko: '사용자 이름' + ru: 'Имя пользователя' + ms: 'Nama pengguna' + pt-br: 'Nome de usuário' + required: true + type: text + - default: "10001" + disabled: true + envKey: VERDACCIO_USER_UID + labelEn: User ID + labelZh: 用户 ID + label: + en: 'User ID' + zh: '用户 ID' + zh-Hant: '使用者 ID' + ja: 'ユーザー ID' + ko: '사용자 ID' + ru: 'ID пользователя' + ms: 'ID pengguna' + pt-br: 'ID do usuário' + required: true + type: number + - default: "http" + disabled: true + envKey: VERDACCIO_PROTOCOL + labelEn: Protocol + labelZh: 协议 + label: + en: 'Protocol' + zh: '协议' + zh-Hant: '協定' + ja: 'プロトコル' + ko: '프로토콜' + ru: 'Протокол' + ms: 'Protokol' + pt-br: 'Protocolo' + required: true + type: text diff --git a/apps/verdaccio/7.1.1/data/config/config.yaml b/apps/verdaccio/7.1.1/data/config/config.yaml new file mode 100644 index 000000000..8a82cff7e --- /dev/null +++ b/apps/verdaccio/7.1.1/data/config/config.yaml @@ -0,0 +1,203 @@ +# +# This is the default configuration file. It allows all users to do anything, +# please read carefully the documentation and best practices to +# improve security. +# +# Do not configure host and port under `listen` in this file +# as it will be ignored when using docker. +# see https://verdaccio.org/docs/en/docker#docker-and-custom-port-configuration +# +# Look here for more config file examples: +# https://github.com/verdaccio/verdaccio/tree/5.x/conf +# +# Read about the best practices +# https://verdaccio.org/docs/best + +# path to a directory with all packages +storage: /verdaccio/storage/data +# path to a directory with plugins to include +plugins: /verdaccio/plugins + +# https://verdaccio.org/docs/webui +web: + title: Verdaccio + # comment out to disable gravatar support + # gravatar: false + # by default packages are ordercer ascendant (asc|desc) + # sort_packages: asc + # convert your UI to the dark side + # darkMode: true + # html_cache: true + # by default all features are displayed + # login: true + # showInfo: true + # showSettings: true + # In combination with darkMode you can force specific theme + # showThemeSwitch: true + # showFooter: true + # showSearch: true + # showRaw: true + # showDownloadTarball: true + # HTML tags injected after manifest + # scriptsBodyAfter: + # - '' + # HTML tags injected before ends + # metaScripts: + # - '' + # - '' + # - '' + # HTML tags injected first child at + # bodyBefore: + # - '
html before webpack scripts
' + # Public path for template manifest scripts (only manifest) + # publicPath: http://somedomain.org/ + +# https://verdaccio.org/docs/configuration#authentication +auth: + htpasswd: + file: /verdaccio/storage/htpasswd + # Maximum amount of users allowed to register, defaults to "+infinity". + # You can set this to -1 to disable registration. + # max_users: 1000 + # Hash algorithm, possible options are: "bcrypt", "md5", "sha1", "crypt". + # algorithm: bcrypt # by default is crypt, but is recommended use bcrypt for new installations + # Rounds number for "bcrypt", will be ignored for other algorithms. + # rounds: 10 + +# https://verdaccio.org/docs/configuration#uplinks +# a list of other known repositories we can talk to +uplinks: + npmjs: + url: https://registry.npmjs.org/ + +# Learn how to protect your packages +# https://verdaccio.org/docs/protect-your-dependencies/ +# https://verdaccio.org/docs/configuration#packages +packages: + '@*/*': + # scoped packages + access: $all + publish: $authenticated + unpublish: $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/publish packages + # (anyone can register by default, remember?) + publish: $authenticated + unpublish: $authenticated + + # if package is not available locally, proxy requests to 'npmjs' registry + proxy: npmjs + +# To improve your security configuration and avoid dependency confusion +# consider removing the proxy property for private packages +# https://verdaccio.org/docs/best#remove-proxy-to-increase-security-at-private-packages + +# https://verdaccio.org/docs/configuration#server +# You can specify HTTP/1.1 server keep alive timeout in seconds for incoming connections. +# A value of 0 makes the http server behave similarly to Node.js versions prior to 8.0.0, which did not have a keep-alive timeout. +# WORKAROUND: Through given configuration you can workaround following issue https://github.com/verdaccio/verdaccio/issues/301. Set to 0 in case 60 is not enough. +server: + keepAliveTimeout: 60 + # Allow `req.ip` to resolve properly when Verdaccio is behind a proxy or load-balancer + # See: https://expressjs.com/en/guide/behind-proxies.html + # trustProxy: '127.0.0.1' + +# https://verdaccio.org/docs/configuration#offline-publish +# publish: +# allow_offline: false + +# https://verdaccio.org/docs/configuration#url-prefix +# url_prefix: /verdaccio/ +# VERDACCIO_PUBLIC_URL='https://somedomain.org'; +# url_prefix: '/my_prefix' +# // url -> https://somedomain.org/my_prefix/ +# VERDACCIO_PUBLIC_URL='https://somedomain.org'; +# url_prefix: '/' +# // url -> https://somedomain.org/ +# VERDACCIO_PUBLIC_URL='https://somedomain.org/first_prefix'; +# url_prefix: '/second_prefix' +# // url -> https://somedomain.org/second_prefix/' + +# https://verdaccio.org/docs/configuration#security +# security: +# api: +# legacy: true +# # recomended set to true for older installations +# migrateToSecureLegacySignature: true +# jwt: +# sign: +# expiresIn: 29d +# verify: +# someProp: [value] +# web: +# sign: +# expiresIn: 1h # 1 hour by default +# verify: +# someProp: [value] + +# https://verdaccio.org/docs/configuration#user-rate-limit +# userRateLimit: +# windowMs: 50000 +# max: 1000 + +# https://verdaccio.org/docs/configuration#max-body-size +# max_body_size: 10mb + +# https://verdaccio.org/docs/configuration#listen-port +# listen: +# - localhost:4873 # default value +# - http://localhost:4873 # same thing +# - 0.0.0.0:4873 # listen on all addresses (INADDR_ANY) +# - https://example.org:4873 # if you want to use https +# - "[::1]:4873" # ipv6 +# - unix:/tmp/verdaccio.sock # unix socket + +# The HTTPS configuration is useful if you do not consider use a HTTP Proxy +# https://verdaccio.org/docs/configuration#https +# https: +# key: ./path/verdaccio-key.pem +# cert: ./path/verdaccio-cert.pem +# ca: ./path/verdaccio-csr.pem + +# https://verdaccio.org/docs/configuration#proxy +# http_proxy: http://something.local/ +# https_proxy: https://something.local/ + +# https://verdaccio.org/docs/configuration#notifications +# notify: +# method: POST +# headers: [{ "Content-Type": "application/json" }] +# endpoint: https://usagge.hipchat.com/v2/room/3729485/notification?auth_token=mySecretToken +# content: '{"color":"green","message":"New package published: * {{ name }}*","notify":true,"message_format":"text"}' + +middlewares: + audit: + enabled: true + +# https://verdaccio.org/docs/logger +# log settings +log: { type: stdout, format: pretty, level: http } +#experiments: +# # support for npm token command +# token: false +# # enable tarball URL redirect for hosting tarball with a different server, the tarball_url_redirect can be a template string +# tarball_url_redirect: 'https://mycdn.com/verdaccio/${packageName}/${filename}' +# # the tarball_url_redirect can be a function, takes packageName and filename and returns the url, when working with a js configuration file +# tarball_url_redirect(packageName, filename) { +# const signedUrl = // generate a signed url +# return signedUrl; +# } + +# translate your registry, api i18n not available yet +# i18n: +# list of the available translations https://github.com/verdaccio/verdaccio/blob/master/packages/plugins/ui-theme/src/i18n/ABOUT_TRANSLATIONS.md +# web: en-US \ No newline at end of file diff --git a/apps/verdaccio/7.1.1/data/plugins/.gitkeep b/apps/verdaccio/7.1.1/data/plugins/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/apps/verdaccio/7.1.1/data/storage/.gitkeep b/apps/verdaccio/7.1.1/data/storage/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/apps/verdaccio/7.1.1/docker-compose.yml b/apps/verdaccio/7.1.1/docker-compose.yml new file mode 100644 index 000000000..47d0f9e2d --- /dev/null +++ b/apps/verdaccio/7.1.1/docker-compose.yml @@ -0,0 +1,25 @@ +services: + verdaccio: + image: "verdaccio/verdaccio:7.1.1" + container_name: ${CONTAINER_NAME} + restart: always + networks: + - 1panel-network + environment: + - VERDACCIO_APPDIR=${VERDACCIO_APPDIR} + - VERDACCIO_USER_NAME=${VERDACCIO_USER_NAME} + - VERDACCIO_USER_UID=${VERDACCIO_USER_UID} + - VERDACCIO_PORT=${PANEL_APP_PORT_HTTP} + - VERDACCIO_PROTOCOL=${VERDACCIO_PROTOCOL} + ports: + - "${PANEL_APP_PORT_HTTP}:${PANEL_APP_PORT_HTTP}" + volumes: + - ${STORAGE_PATH}:/verdaccio/storage + - ${CONFIG_PATH}:/verdaccio/conf + - ${PLUGINS_PATH}:/verdaccio/plugins + labels: + createdBy: "Apps" + +networks: + 1panel-network: + external: true diff --git a/apps/verdaccio/7.1.1/scripts/init.sh b/apps/verdaccio/7.1.1/scripts/init.sh new file mode 100644 index 000000000..44a563b22 --- /dev/null +++ b/apps/verdaccio/7.1.1/scripts/init.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +chown -R 10001:65533 data \ No newline at end of file