Compare commits

..

2 Commits

Author SHA1 Message Date
Michel Roegl-Brunner
3c582e37dc docs: update contribution docs for website metadata workflow (fixes #12839)
- Request metadata via website Report issue button instead of JSON in repo
- PRs now include only 2 files: ct/*.sh and install/*-install.sh
- Update README, GUIDE, CONTRIBUTING, AI.md, CODE-AUDIT, templates
- Fix docs/ct README link from CONTRIBUTION_GUIDE to contribution/README

Made-with: Cursor
2026-03-13 12:46:28 +01:00
Michel Roegl-Brunner
0071259e67 instead of deleting from pocketbase we display a is delete message with aditionl optional text 2026-03-13 12:40:14 +01:00
12 changed files with 106 additions and 85 deletions

View File

@@ -52,15 +52,15 @@ jobs:
slugs=$(echo $slugs | xargs -n1 | sort -u | tr '\n' ' ')
if [[ -z "$slugs" ]]; then
echo "No deleted JSON or script files to remove from PocketBase."
echo "No deleted JSON or script files to mark as deleted in PocketBase."
echo "count=0" >> "$GITHUB_OUTPUT"
exit 0
fi
echo "$slugs" > slugs_to_delete.txt
echo "count=$(echo $slugs | wc -w)" >> "$GITHUB_OUTPUT"
echo "Slugs to delete: $slugs"
echo "Slugs to mark as deleted: $slugs"
- name: Delete from PocketBase
- name: Mark as deleted in PocketBase
if: steps.slugs.outputs.count != '0'
env:
POCKETBASE_URL: ${{ secrets.POCKETBASE_URL }}
@@ -123,6 +123,8 @@ jobs:
const token = JSON.parse(authRes.body).token;
const recordsUrl = apiBase + '/collections/' + encodeURIComponent(coll) + '/records';
const patchBody = JSON.stringify({ is_deleted: true });
for (const slug of slugs) {
const filter = "(slug='" + slug + "')";
const listRes = await request(recordsUrl + '?filter=' + encodeURIComponent(filter) + '&perPage=1', {
@@ -134,14 +136,15 @@ jobs:
console.log('No PocketBase record for slug "' + slug + '", skipping.');
continue;
}
const delRes = await request(recordsUrl + '/' + existingId, {
method: 'DELETE',
headers: { 'Authorization': token }
const patchRes = await request(recordsUrl + '/' + existingId, {
method: 'PATCH',
headers: { 'Authorization': token, 'Content-Type': 'application/json' },
body: patchBody
});
if (delRes.ok) {
console.log('Deleted PocketBase record for slug "' + slug + '" (id=' + existingId + ').');
if (patchRes.ok) {
console.log('Set is_deleted=true for slug "' + slug + '" (id=' + existingId + ').');
} else {
console.warn('DELETE failed for slug "' + slug + '": ' + delRes.statusCode + ' ' + delRes.body);
console.warn('PATCH failed for slug "' + slug + '": ' + patchRes.statusCode + ' ' + patchRes.body);
}
}
console.log('Done.');

View File

@@ -420,14 +420,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
</details>
## 2026-03-13
### 🚀 Updated Scripts
- #### 🔧 Refactor
- Discopanel: V2 Support + Script rewrite [@nickheyer](https://github.com/nickheyer) ([#12763](https://github.com/community-scripts/ProxmoxVE/pull/12763))
## 2026-03-12
### 🚀 Updated Scripts

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2026 community-scripts ORG
# Author: DragoQC | Co-Author: nickheyer
# Author: DragoQC
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://discopanel.app/ | Github: https://github.com/nickheyer/discopanel
@@ -38,15 +38,34 @@ function update_script() {
msg_info "Creating Backup"
mkdir -p /opt/discopanel_backup_temp
cp /opt/discopanel/data/discopanel.db /opt/discopanel_backup_temp/discopanel.db
cp -r /opt/discopanel/data/discopanel.db \
/opt/discopanel/data/.recovery_key \
/opt/discopanel_backup_temp/
if [[ -d /opt/discopanel/data/servers ]]; then
cp -r /opt/discopanel/data/servers /opt/discopanel_backup_temp/
fi
msg_ok "Created Backup"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "discopanel" "nickheyer/discopanel" "prebuild" "latest" "/opt/discopanel" "discopanel-linux-amd64.tar.gz"
ln -sf /opt/discopanel/discopanel-linux-amd64 /opt/discopanel/discopanel
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "discopanel" "nickheyer/discopanel" "tarball" "latest" "/opt/discopanel"
msg_info "Setting up DiscoPanel"
cd /opt/discopanel
$STD make gen
cd /opt/discopanel/web/discopanel
$STD npm install
$STD npm run build
msg_ok "Built Web Interface"
setup_go
msg_info "Building DiscoPanel"
cd /opt/discopanel
$STD go build -o discopanel cmd/discopanel/main.go
msg_ok "Built DiscoPanel"
msg_info "Restoring Data"
mkdir -p /opt/discopanel/data
mv /opt/discopanel_backup_temp/discopanel.db /opt/discopanel/data/discopanel.db
cp -a /opt/discopanel_backup_temp/. /opt/discopanel/data/
rm -rf /opt/discopanel_backup_temp
msg_ok "Restored Data"

View File

@@ -1,4 +1,4 @@
# 🤖 AI Contribution Guidelines for ProxmoxVE
# 🤖 AI Contribution Guidelines for ProxmoxVE
> **This documentation is intended for all AI assistants (GitHub Copilot, Claude, ChatGPT, etc.) contributing to this project.**
@@ -653,15 +653,15 @@ Look at these recent well-implemented applications as reference:
- Use of `check_for_gh_release` and `fetch_and_deploy_gh_release`
- Correct backup/restore patterns in `update_script`
- Footer always ends with `motd_ssh`, `customize`, `cleanup_lxc`
- JSON metadata files created for each app
- Website metadata requested via the website (Report issue on script page) if needed
---
## <EFBFBD> JSON Metadata Files
## Website Metadata (Reference)
Every application requires a JSON metadata file in `frontend/public/json/<appname>.json`.
Website metadata (name, slug, description, logo, categories, etc.) is **not** added as files in the repo. Contributors request or update it via the **website**: go to the script's page and use the **Report issue** button; the flow will guide you. The structure below is a **reference** for what metadata exists (e.g. for the form or when describing what you need).
### JSON Structure
### JSON Structure (Reference)
```json
{
@@ -804,7 +804,7 @@ Or no credentials:
- [ ] `motd_ssh`, `customize`, `cleanup_lxc` at the end of install scripts
- [ ] No custom download/version-check logic
- [ ] All links point to `community-scripts/ProxmoxVE` (not `ProxmoxVED`!)
- [ ] JSON metadata file created in `frontend/public/json/<appname>.json`
- [ ] Website metadata requested via the website (Report issue) if needed
- [ ] Category IDs are valid (0-25)
- [ ] Default OS version is Debian 13 or newer (unless special requirement)
- [ ] Default resources are reasonable for the application
@@ -832,15 +832,15 @@ Or no credentials:
## 🍒 Important: Cherry-Picking Your Files for PR Submission
⚠️ **CRITICAL**: When you submit your PR, you must use git cherry-pick to send ONLY your 3-4 files!
⚠️ **CRITICAL**: When you submit your PR, you must use git cherry-pick to send ONLY your 2 files!
Why? Because `setup-fork.sh` modifies 600+ files to update links. If you commit all changes, your PR will be impossible to merge.
**See**: [README.md - Cherry-Pick Section](README.md#-cherry-pick-submitting-only-your-changes) for complete instructions on:
- Creating a clean submission branch
- Cherry-picking only your files (ct/myapp.sh, install/myapp-install.sh, frontend/public/json/myapp.json)
- Verifying your PR has only 3 file changes (not 600+)
- Cherry-picking only your files (ct/myapp.sh, install/myapp-install.sh)
- Verifying your PR has only 2 file changes (not 600+)
**Quick reference**:
@@ -849,7 +849,7 @@ Why? Because `setup-fork.sh` modifies 600+ files to update links. If you commit
git fetch upstream
git checkout -b submit/myapp upstream/main
# Cherry-pick your commit(s) or manually add your 3-4 files
# Cherry-pick your commit(s) or manually add your 2 files
# Then push to your fork and create PR
```
@@ -865,4 +865,4 @@ git checkout -b submit/myapp upstream/main
- [../EXIT_CODES.md](../EXIT_CODES.md) - Exit code reference
- [templates_ct/](templates_ct/) - CT script templates
- [templates_install/](templates_install/) - Install script templates
- [templates_json/](templates_json/) - JSON metadata templates
- [templates_json/](templates_json/) - Metadata structure reference; submit via website

View File

@@ -24,9 +24,9 @@ This guide explains the current execution flow and what to verify during reviews
- Uses `tools.func` helpers (setup\_\*).
- Ends with `motd_ssh`, `customize`, `cleanup_lxc`.
### JSON Metadata
### Website Metadata
- File in `frontend/public/json/<appname>.json` matches template schema.
- Website metadata for new/updated scripts is requested via the website (Report issue on script page) where applicable.
### Testing

View File

@@ -19,7 +19,7 @@ These documents cover the coding standards for the following types of files in o
- **`install/$AppName-install.sh` Scripts**: These scripts are responsible for the installation of applications.
- **`ct/$AppName.sh` Scripts**: These scripts handle the creation and updating of containers.
- **`json/$AppName.json`**: These files store structured data and are used for the website.
- **Website metadata**: Display data (name, description, logo, etc.) is requested via the website (Report issue on the script page), not via files in the repo.
Each section provides detailed guidelines on various aspects of coding, including shebang usage, comments, variable naming, function naming, indentation, error handling, command substitution, quoting, script structure, and logging. Additionally, examples are provided to illustrate the application of these standards.
@@ -110,7 +110,7 @@ git push origin your-feature-branch
### 6. Cherry-Pick: Submit Only Your Files for PR
⚠️ **IMPORTANT**: setup-fork.sh modified 600+ files. You MUST only submit your 3 new files!
⚠️ **IMPORTANT**: setup-fork.sh modified 600+ files. You MUST only submit your 2 new files!
See [README.md - Cherry-Pick Guide](README.md#-cherry-pick-submitting-only-your-changes) for step-by-step instructions.
@@ -124,12 +124,11 @@ git checkout -b submit/myapp upstream/main
# Copy only your files
cp ../your-work-branch/ct/myapp.sh ct/myapp.sh
cp ../your-work-branch/install/myapp-install.sh install/myapp-install.sh
cp ../your-work-branch/frontend/public/json/myapp.json frontend/public/json/myapp.json
# Commit and verify
git add ct/myapp.sh install/myapp-install.sh frontend/public/json/myapp.json
git add ct/myapp.sh install/myapp-install.sh
git commit -m "feat: add MyApp"
git diff upstream/main --name-only # Should show ONLY your 3 files
git diff upstream/main --name-only # Should show ONLY your 2 files
# Push and create PR
git push origin submit/myapp
@@ -139,11 +138,10 @@ git push origin submit/myapp
Open a Pull Request from `submit/myapp``community-scripts/ProxmoxVE/main`.
Verify the PR shows ONLY these 3 files:
Verify the PR shows ONLY these 2 files:
- `ct/myapp.sh`
- `install/myapp-install.sh`
- `frontend/public/json/myapp.json`
---
@@ -175,4 +173,4 @@ dev_mode="trace,keep" bash -c "$(curl -fsSL https://raw.githubusercontent.com/co
- [CT Template: AppName.sh](https://github.com/community-scripts/ProxmoxVE/blob/main/docs/contribution/templates_ct/AppName.sh)
- [Install Template: AppName-install.sh](https://github.com/community-scripts/ProxmoxVE/blob/main/docs/contribution/templates_install/AppName-install.sh)
- [JSON Template: AppName.json](https://github.com/community-scripts/ProxmoxVE/blob/main/docs/contribution/templates_json/AppName.json)
- [JSON Template: AppName.json](https://github.com/community-scripts/ProxmoxVE/blob/main/docs/contribution/templates_json/AppName.json) — metadata structure reference; submit via the website (Report issue on script page)

View File

@@ -54,15 +54,13 @@ git checkout -b add/my-awesome-app
# 2. Create application scripts from templates
cp docs/contribution/templates_ct/AppName.sh ct/myapp.sh
cp docs/contribution/templates_install/AppName-install.sh install/myapp-install.sh
cp docs/contribution/templates_json/AppName.json frontend/public/json/myapp.json
# 3. Edit your scripts
nano ct/myapp.sh
nano install/myapp-install.sh
nano frontend/public/json/myapp.json
# 4. Commit and push to your fork
git add ct/myapp.sh install/myapp-install.sh frontend/public/json/myapp.json
git add ct/myapp.sh install/myapp-install.sh
git commit -m "feat: add MyApp container and install scripts"
git push origin add/my-awesome-app
@@ -74,6 +72,8 @@ bash -c "$(curl -fsSL https://raw.githubusercontent.com/YOUR_USERNAME/ProxmoxVE/
# 7. Open Pull Request on GitHub
# Create PR from: your-fork/add/my-awesome-app → community-scripts/ProxmoxVE/main
# To add or change website metadata (description, logo, etc.), use the Report issue button on the script's page on the website.
```
**💡 Tip**: See `../FORK_SETUP.md` for detailed fork setup and troubleshooting

View File

@@ -50,15 +50,14 @@ git push origin feature/my-awesome-app
bash -c "$(curl -fsSL https://raw.githubusercontent.com/YOUR_USERNAME/ProxmoxVE/main/ct/myapp.sh)"
# ⏱️ GitHub may take 10-30 seconds to update files - be patient!
# 8. Create your JSON metadata file
cp docs/contribution/templates_json/AppName.json frontend/public/json/myapp.json
# Edit metadata: name, slug, categories, description, resources, etc.
# 8. Request website metadata via the website
# Go to the script's page on the website, use the "Report issue" button — it will guide you.
# 9. No direct install-script test
# Install scripts are executed by the CT script inside the container
# 10. Commit ONLY your new files (see Cherry-Pick section below!)
git add ct/myapp.sh install/myapp-install.sh frontend/public/json/myapp.json
git add ct/myapp.sh install/myapp-install.sh
git commit -m "feat: add MyApp container and install scripts"
git push origin feature/my-awesome-app
@@ -67,7 +66,7 @@ git push origin feature/my-awesome-app
⚠️ **IMPORTANT: After setup-fork.sh, many files are modified!**
See the **Cherry-Pick: Submitting Only Your Changes** section below to learn how to push ONLY your 3-4 files instead of 600+ modified files!
See the **Cherry-Pick: Submitting Only Your Changes** section below to learn how to push ONLY your 2 files instead of 600+ modified files!
### How Users Run Scripts (After Merged)
@@ -180,7 +179,7 @@ All scripts and configurations must follow our coding standards to ensure consis
- **[HELPER_FUNCTIONS.md](HELPER_FUNCTIONS.md)** - Reference for all tools.func helper functions
- **Container Scripts** - `/ct/` templates and guidelines
- **Install Scripts** - `/install/` templates and guidelines
- **JSON Configurations** - `frontend/public/json/` structure and format
- **Website metadata** Request via the website (Report issue on the script page); see [templates_json/AppName.md](templates_json/AppName.md)
### Quick Checklist
@@ -213,7 +212,7 @@ Key points:
## 🍒 Cherry-Pick: Submitting Only Your Changes
**Problem**: `setup-fork.sh` modifies 600+ files to update links. You don't want to submit all of those changes - only your new 3-4 files!
**Problem**: `setup-fork.sh` modifies 600+ files to update links. You don't want to submit all of those changes - only your new 2 files!
**Solution**: Use git cherry-pick to select only YOUR files.
@@ -226,7 +225,7 @@ Key points:
git status
# Verify your files are there
git status | grep -E "ct/myapp|install/myapp|json/myapp"
git status | grep -E "ct/myapp|install/myapp"
```
#### 2. Create a clean feature branch for submission
@@ -252,15 +251,13 @@ git cherry-pick <commit-hash-of-your-files>
# From your work branch, get the file contents
git show feature/my-awesome-app:ct/myapp.sh > /tmp/myapp.sh
git show feature/my-awesome-app:install/myapp-install.sh > /tmp/myapp-install.sh
git show feature/my-awesome-app:frontend/public/json/myapp.json > /tmp/myapp.json
# Add them to the clean branch
cp /tmp/myapp.sh ct/myapp.sh
cp /tmp/myapp-install.sh install/myapp-install.sh
cp /tmp/myapp.json frontend/public/json/myapp.json
# Commit
git add ct/myapp.sh install/myapp-install.sh frontend/public/json/myapp.json
git add ct/myapp.sh install/myapp-install.sh
git commit -m "feat: add MyApp"
```
@@ -272,7 +269,6 @@ git diff upstream/main --name-only
# Should show ONLY:
# ct/myapp.sh
# install/myapp-install.sh
# frontend/public/json/myapp.json
```
#### 5. Push and create PR
@@ -345,7 +341,8 @@ If you're using **Visual Studio Code** with an AI assistant, you can leverage ou
Please follow the guidelines in docs/contribution/AI.md to create:
1. ct/myapp.sh (container script)
2. install/myapp-install.sh (installation script)
3. frontend/public/json/myapp.json (metadata)
Website listing/metadata is requested separately via the website (Report issue on the script page).
```
4. **AI Will Generate**
@@ -357,6 +354,8 @@ If you're using **Visual Studio Code** with an AI assistant, you can leverage ou
- Have correct update mechanisms
- Are ready to submit as a PR
Website listing/metadata is requested separately via the website (Report issue on the script page).
### Key Points for AI Assistants
- **Templates Location**: `docs/contribution/templates_ct/AppName.sh`, `templates_install/`, `templates_json/`
@@ -409,11 +408,10 @@ cp docs/contribution/templates_ct/AppName.sh ct/my-app.sh
# Installation script template
cp docs/contribution/templates_install/AppName-install.sh install/my-app-install.sh
# JSON configuration template
cp docs/contribution/templates_json/AppName.json frontend/public/json/my-app.json
```
For website metadata (description, logo, etc.), use the Report issue button on the script's page on the website.
**Template Features:**
- Updated to match current codebase patterns

View File

@@ -149,7 +149,7 @@ fetch_and_deploy_gh_release "myapp" "owner/repo"
2. **Only add app-specific dependencies** - Don't add ca-certificates, curl, gnupg (handled by build.func)
3. **Test via curl from your fork** - Push first, then: `bash -c "$(curl -fsSL https://raw.githubusercontent.com/YOUR_USERNAME/ProxmoxVE/main/ct/MyApp.sh)"`
4. **Wait for GitHub to update** - Takes 10-30 seconds after git push
5. **Cherry-pick only YOUR files** - Submit only ct/MyApp.sh, install/MyApp-install.sh, frontend/public/json/myapp.json (3 files)
5. **Cherry-pick only YOUR files** - Submit only ct/MyApp.sh, install/MyApp-install.sh (2 files). Website metadata: use Report issue on the script's page on the website.
6. **Verify before PR** - Run `git diff upstream/main --name-only` to confirm only your files changed
---

View File

@@ -1,21 +1,20 @@
# JSON Metadata Files - Quick Reference
# Website Metadata - Quick Reference
The metadata file (`frontend/public/json/myapp.json`) tells the web interface how to display your application.
Metadata (name, slug, description, logo, categories, etc.) controls how your application appears on the website. You do **not** add JSON files to the repo — you request changes via the website.
---
## Quick Start
## How to Request or Update Metadata
**Use the JSON Generator Tool:**
[https://community-scripts.github.io/ProxmoxVE/json-editor](https://community-scripts.github.io/ProxmoxVE/json-editor)
1. Enter application details
2. Generator creates `frontend/public/json/myapp.json`
3. Copy the output to your contribution
1. **Go to the script on the website** — Open the [ProxmoxVE website](https://community-scripts.github.io/ProxmoxVE/), find your script (or the script you want to update).
2. **Press the "Report issue" button** on that scripts page.
3. **Follow the guide** — The flow will walk you through submitting or updating metadata.
---
## File Structure
## Metadata Structure (Reference)
The following describes the structure of script metadata used by the website. Use it as reference when filling out the form or describing what you need.
```json
{
@@ -148,18 +147,14 @@ Each installation method specifies resource requirements:
---
## Reference Examples
## See Examples on the Website
See actual examples in the repo:
- [frontend/public/json/trip.json](https://github.com/community-scripts/ProxmoxVE/blob/main/frontend/public/json/trip.json)
- [frontend/public/json/thingsboard.json](https://github.com/community-scripts/ProxmoxVE/blob/main/frontend/public/json/thingsboard.json)
- [frontend/public/json/unifi.json](https://github.com/community-scripts/ProxmoxVE/blob/main/frontend/public/json/unifi.json)
View script pages on the [ProxmoxVE website](https://community-scripts.github.io/ProxmoxVE/) to see how metadata is displayed for existing scripts.
---
## Need Help?
- **[JSON Generator](https://community-scripts.github.io/ProxmoxVE/json-editor)** - Interactive tool
- **Request metadata** — Use the Report issue button on the scripts page on the website (see [How to Request or Update Metadata](#how-to-request-or-update-metadata) above).
- **[JSON Generator](https://community-scripts.github.io/ProxmoxVE/json-editor)** - Reference only; structure validation
- **[README.md](../README.md)** - Full contribution workflow
- **[Quick Start](../README.md)** - Step-by-step guide

View File

@@ -61,7 +61,7 @@ To understand how to create a container script:
## Common Tasks
- **Add new container application** → [CONTRIBUTION_GUIDE.md](../CONTRIBUTION_GUIDE.md)
- **Add new container application** → [contribution/README.md](../contribution/README.md)
- **Debug container creation** → [EXIT_CODES.md](../EXIT_CODES.md)
- **Understand build.func** → [misc/build.func/](../misc/build.func/)
- **Development mode debugging** → [DEV_MODE.md](../DEV_MODE.md)

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
# Author: DragoQC | Co-Author: nickheyer
# Author: DragoQC
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://discopanel.app/ | Github: https://github.com/nickheyer/discopanel
@@ -12,9 +12,25 @@ setting_up_container
network_check
update_os
fetch_and_deploy_gh_release "discopanel" "nickheyer/discopanel" "prebuild" "latest" "/opt/discopanel" "discopanel-linux-amd64.tar.gz"
msg_info "Installing Dependencies"
$STD apt install -y build-essential
msg_ok "Installed Dependencies"
NODE_VERSION="22" setup_nodejs
setup_go
fetch_and_deploy_gh_release "discopanel" "nickheyer/discopanel" "tarball" "latest" "/opt/discopanel"
setup_docker
msg_info "Setting up DiscoPanel"
cd /opt/discopanel
$STD make gen
cd /opt/discopanel/web/discopanel
$STD npm install
$STD npm run build
cd /opt/discopanel
$STD go build -o discopanel cmd/discopanel/main.go
msg_ok "Setup DiscoPanel"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/discopanel.service
[Unit]
@@ -23,7 +39,7 @@ After=network.target
[Service]
WorkingDirectory=/opt/discopanel
ExecStart=/opt/discopanel/discopanel-linux-amd64
ExecStart=/opt/discopanel/discopanel
Restart=always
[Install]