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:
Jocelyn Knight 2025-09-20 10:44:24 -07:00 committed by Michel Roegl-Brunner
parent 9926ed24e3
commit 4a2786ac4d
3 changed files with 14 additions and 45 deletions

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/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 # Copyright (c) 2021-2025 community-scripts ORG
# Author: BrynnJKnight # Author: BrynnJKnight
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # 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_ram="${var_ram:-2048}"
var_disk="${var_disk:-8}" var_disk="${var_disk:-8}"
var_os="${var_os:-debian}" var_os="${var_os:-debian}"
var_version="${var_version:-12}" var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}" var_unprivileged="${var_unprivileged:-1}"
header_info "$APP" header_info "$APP"

View File

@ -12,7 +12,7 @@
"documentation": "https://verdaccio.org/docs/what-is-verdaccio", "documentation": "https://verdaccio.org/docs/what-is-verdaccio",
"website": "https://verdaccio.org/", "website": "https://verdaccio.org/",
"logo": "https://verdaccio.org/img/logo/symbol/png/verdaccio-tiny.png", "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.", "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": [ "install_methods": [
{ {
@ -23,30 +23,18 @@
"ram": 2048, "ram": 2048,
"hdd": 8, "hdd": 8,
"os": "debian", "os": "debian",
"version": "12" "version": "13"
} }
} }
], ],
"default_credentials": { "default_credentials": {
"username": "Create via CLI", "username": null,
"password": "Create via CLI" "password": null
}, },
"notes": [ "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", "text": "To create the first user, run: npm adduser --registry http://<container-ip>:4873",
"type": "info" "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"
} }
] ]
} }

View File

@ -26,16 +26,15 @@ $STD npm install --global verdaccio
msg_ok "Installed Verdaccio" msg_ok "Installed Verdaccio"
msg_info "Configuring Verdaccio" msg_info "Configuring Verdaccio"
HOST_IP=$(hostname -I | awk '{print $1}') mkdir -p /opt/verdaccio/config
mkdir -p /etc/verdaccio mkdir -p /opt/verdaccio/storage
mkdir -p /var/lib/verdaccio
cat <<EOF >/etc/verdaccio/config.yaml cat <<EOF >/opt/verdaccio/config/config.yaml
# Verdaccio configuration # Verdaccio configuration
storage: /var/lib/verdaccio storage: /opt/verdaccio/storage
auth: auth:
htpasswd: htpasswd:
file: /var/lib/verdaccio/htpasswd file: /opt/verdaccio/storage/htpasswd
max_users: 1000 max_users: 1000
uplinks: uplinks:
npmjs: npmjs:
@ -64,10 +63,8 @@ web:
login: true login: true
EOF EOF
chown -R root:root /etc/verdaccio chown -R root:root /opt/verdaccio
chown -R root:root /var/lib/verdaccio chmod -R 755 /opt/verdaccio
chmod -R 755 /etc/verdaccio
chmod -R 755 /var/lib/verdaccio
msg_ok "Configured Verdaccio" msg_ok "Configured Verdaccio"
msg_info "Creating Service" msg_info "Creating Service"
@ -78,7 +75,7 @@ After=network.target
[Service] [Service]
Type=simple Type=simple
ExecStart=/usr/bin/verdaccio --config /etc/verdaccio/config.yaml ExecStart=/usr/bin/verdaccio --config /opt/verdaccio/config/config.yaml
Restart=on-failure Restart=on-failure
StandardOutput=journal StandardOutput=journal
StandardError=journal StandardError=journal
@ -92,22 +89,6 @@ EOF
systemctl enable -q --now verdaccio systemctl enable -q --now verdaccio
msg_ok "Created Service" 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 motd_ssh
customize customize