Update: Address PR feedback
- Change credentials from 'Create via CLI' to null - Remove redundant informational notes - Move config and storage from /etc and /var/lib to /opt - Remove custom update script (use built-in) - Update source URL to ProxmoxVED - Switch to Debian 13 (Trixie)
This commit is contained in:
parent
9926ed24e3
commit
4a2786ac4d
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: BrynnJKnight
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
@ -11,7 +11,7 @@ var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-2048}"
|
||||
var_disk="${var_disk:-8}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-12}"
|
||||
var_version="${var_version:-13}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
|
@ -12,7 +12,7 @@
|
||||
"documentation": "https://verdaccio.org/docs/what-is-verdaccio",
|
||||
"website": "https://verdaccio.org/",
|
||||
"logo": "https://verdaccio.org/img/logo/symbol/png/verdaccio-tiny.png",
|
||||
"config_path": "/etc/verdaccio/config.yaml",
|
||||
"config_path": "/opt/verdaccio/config/config.yaml",
|
||||
"description": "Verdaccio is a lightweight private npm proxy registry built with Node.js. It allows you to host your own npm registry with minimal configuration, providing a private npm repository for your projects. Verdaccio supports npm, yarn, and pnpm, and can cache packages from the public npm registry, allowing for faster installs and protection against npm registry outages. It includes a web interface for browsing packages, authentication and authorization features, and can be easily integrated into your development workflow.",
|
||||
"install_methods": [
|
||||
{
|
||||
@ -23,30 +23,18 @@
|
||||
"ram": 2048,
|
||||
"hdd": 8,
|
||||
"os": "debian",
|
||||
"version": "12"
|
||||
"version": "13"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": "Create via CLI",
|
||||
"password": "Create via CLI"
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"notes": [
|
||||
{
|
||||
"text": "Default configuration proxies to npmjs.org for packages not found locally.",
|
||||
"type": "info"
|
||||
},
|
||||
{
|
||||
"text": "To create the first user, run: npm adduser --registry http://<container-ip>:4873",
|
||||
"type": "info"
|
||||
},
|
||||
{
|
||||
"text": "After creating a user, you can publish packages with: npm publish --registry http://<container-ip>:4873",
|
||||
"type": "info"
|
||||
},
|
||||
{
|
||||
"text": "Configuration file located at /etc/verdaccio/config.yaml",
|
||||
"type": "info"
|
||||
}
|
||||
]
|
||||
}
|
@ -26,16 +26,15 @@ $STD npm install --global verdaccio
|
||||
msg_ok "Installed Verdaccio"
|
||||
|
||||
msg_info "Configuring Verdaccio"
|
||||
HOST_IP=$(hostname -I | awk '{print $1}')
|
||||
mkdir -p /etc/verdaccio
|
||||
mkdir -p /var/lib/verdaccio
|
||||
mkdir -p /opt/verdaccio/config
|
||||
mkdir -p /opt/verdaccio/storage
|
||||
|
||||
cat <<EOF >/etc/verdaccio/config.yaml
|
||||
cat <<EOF >/opt/verdaccio/config/config.yaml
|
||||
# Verdaccio configuration
|
||||
storage: /var/lib/verdaccio
|
||||
storage: /opt/verdaccio/storage
|
||||
auth:
|
||||
htpasswd:
|
||||
file: /var/lib/verdaccio/htpasswd
|
||||
file: /opt/verdaccio/storage/htpasswd
|
||||
max_users: 1000
|
||||
uplinks:
|
||||
npmjs:
|
||||
@ -64,10 +63,8 @@ web:
|
||||
login: true
|
||||
EOF
|
||||
|
||||
chown -R root:root /etc/verdaccio
|
||||
chown -R root:root /var/lib/verdaccio
|
||||
chmod -R 755 /etc/verdaccio
|
||||
chmod -R 755 /var/lib/verdaccio
|
||||
chown -R root:root /opt/verdaccio
|
||||
chmod -R 755 /opt/verdaccio
|
||||
msg_ok "Configured Verdaccio"
|
||||
|
||||
msg_info "Creating Service"
|
||||
@ -78,7 +75,7 @@ After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/verdaccio --config /etc/verdaccio/config.yaml
|
||||
ExecStart=/usr/bin/verdaccio --config /opt/verdaccio/config/config.yaml
|
||||
Restart=on-failure
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
@ -92,22 +89,6 @@ EOF
|
||||
systemctl enable -q --now verdaccio
|
||||
msg_ok "Created Service"
|
||||
|
||||
msg_info "Creating Update Script"
|
||||
cat <<'EOF' >/usr/bin/update
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
NODE_VERSION="22"
|
||||
export NVM_DIR="/opt/nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
||||
nvm use $NODE_VERSION >/dev/null 2>&1
|
||||
|
||||
echo "Updating Verdaccio..."
|
||||
npm update -g verdaccio
|
||||
systemctl restart verdaccio
|
||||
echo "Verdaccio has been updated successfully."
|
||||
EOF
|
||||
chmod +x /usr/bin/update
|
||||
msg_ok "Created Update Script"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
Loading…
x
Reference in New Issue
Block a user