mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-02-05 21:03:24 +01:00
* Enhance setup-fork.sh with --full mode and misc/ targeting Added a new --full flag to setup-fork.sh to allow updating all files, not just those in misc/. Updated documentation and usage examples to clarify the new behavior. Improved file search and replacement logic for broader compatibility and flexibility. * add AI.md * fix links in AI.md * Update contribution docs and templates for best practices Refreshed AI.md with new reference scripts, expanded checklist, and improved AI assistant tips. Updated container and install script templates for modern defaults (Debian 13, larger disk, two tags), clarified helper function usage, and improved update/backup patterns. Enhanced JSON template with realistic metadata, new fields, and example notes. * Update fetch_and_deploy_gh_release usage in docs and templates Standardize the usage of fetch_and_deploy_gh_release by specifying all arguments, including mode, version, and target directory, in AI.md and template scripts. This clarifies the function's usage and ensures consistency across documentation and install/update templates. * Revise contribution docs and update CT template Expanded and clarified contribution documentation for forking, local development, cherry-picking, and AI-assisted code generation. Improved explanations for setup-fork.sh, local testing, and PR submission. Enhanced the container script template with detailed comments, clearer update_script structure, and step-by-step guidance for maintainers and contributors. * Update fork and release instructions in contribution docs Replaced placeholder GitHub repo references with 'YourUsername/YourRepo' throughout documentation for clarity. Expanded explanations in FORK_SETUP.md and README.md to clarify the difference between development and production script execution, and emphasized the importance of cherry-picking only relevant files for PRs. Updated install script template examples to use the new repo placeholder. * Update GitHub repo placeholders in docs and templates Replaced 'YourUsername/YourRepo' with 'owner/repo' in documentation and template scripts for consistency and clarity. This change standardizes example usage and reduces confusion for contributors. * Move user submitted guides to guides directory Renamed USER_SUBMITTED_GUIDES.md from docs/contribution to docs/guides for improved documentation organization. * Update contribution docs for improved workflow and clarity Revised multiple documentation files to clarify the recommended development workflow: contributors must test scripts via curl from their GitHub fork (not local bash), use setup-fork.sh for URL rewriting, and submit only new files using cherry-pick. Expanded and modernized install and JSON metadata template guides, emphasizing use of helper functions, resource requirements, and the JSON generator tool. Added detailed step-by-step instructions, best practices, and updated examples throughout. * Update contribution docs for new file structure Updated documentation to reflect the migration of install scripts from install_scripts/ to install/, and JSON metadata from config/ to frontend/public/json/. Adjusted all relevant paths, instructions, and examples to match the new directory structure for improved clarity and consistency. * Update contribution docs for fork setup and metadata Revised documentation to standardize use of 'bash docs/contribution/setup-fork.sh --full' for fork configuration, clarified install script execution flow, and updated JSON metadata template and field references. Improved helper function docs, resource requirements, and category lists. Updated references and instructions throughout for consistency and accuracy. * Docs: add GPU/TUN, update endpoints & tool refs Documentation updates across guides and function references: - Added var_gpu and var_tun configuration entries to CONFIGURATION_REFERENCE (GPU passthrough and TUN/TAP support), including features and prerequisites. - Fixed repository URLs throughout UNATTENDED_DEPLOYMENTS and examples: replaced community-scripts/ProxmoxVED with community-scripts/ProxmoxVE and updated curl usage to the new paths. - Added an "Advanced Configuration Variables" table and examples (var_os, var_version, var_gpu, var_tun, var_nesting) to UNATTENDED_DEPLOYMENTS; adjusted sample apps, hostnames, and container mappings in batch examples. - Switched API endpoints in API_FUNCTIONS_REFERENCE and API_USAGE_EXAMPLES from http://api.community-scripts.org to https://api.community-scripts.org. - Expanded BUILD_FUNC_FUNCTIONS_REFERENCE with container resource/ID management helper descriptions (validate_container_id, get_valid_container_id, maxkeys_check, get_current_ip, update_motd_ip). - Large edits to TOOLS_FUNC_FUNCTIONS_REFERENCE: renamed/refactored helper signatures and docs (pkg_install -> install_packages_with_retry, pkg_update -> upgrade_packages_with_retry), added new tooling functions (fetch_and_deploy_gh_release, check_for_gh_release, prepare_repository_setup, verify_tool_version) and updated examples and feature notes. - Updated vm/README.md to list additional VM scripts (new and reorganized examples). These are documentation-only changes to clarify configuration options, correct links and endpoints, and expand the reference material for tooling and build helpers. * Docs: expand developer/debugging and tools references Add extensive documentation and examples across contribution, guides, templates and tools references. Key changes: - Introduce a Developer Mode & Debugging section (dev_mode flags: trace, keep, pause, breakpoint, logs, dryrun, motd) in CONTRIBUTING.md with usage example. - Provide a standard update_script() pattern and BookStack example in GUIDE.md to clarify update flow (stop services, backup, deploy, restore, migrate, restart). - Add new helper entries (BookLore, KaraKeep) and advanced repository helpers (setup_deb822_repo, prepare_repository_setup, cleanup_tool_keyrings) plus utilities (setup_meilisearch, verify_tool_version) in HELPER_FUNCTIONS.md. - Update install template to suggest PNPM, Java 21 and Meilisearch; update example DB setup notes in AppName-install.sh. - Add var_diagnostics option and switch var_fuse to boolean/toggle wording in CONFIGURATION_REFERENCE.md; clarify privacy and defaults. - Adjust example container definitions in UNATTENDED_DEPLOYMENTS.md (container entries and resource values). - Change storage and flag variables and examples in BUILD_FUNC_USAGE_EXAMPLES.md (ssd-storage, var_fuse/var_tun, etc.). - Expand TOOLS_FUNC_FUNCTIONS_REFERENCE.md with many setup_* function signatures, environment vars, clarified fetch_and_deploy_gh_release modes/parameters, and additional tool docs (nodejs, php, mariadb_db, postgresql_db, java, uv, yq, meilisearch, composer, build tools). These updates improve onboarding, debugging guidance, and operational clarity for contributors and maintainers.
5.3 KiB
5.3 KiB
🍴 Fork Setup Guide
Just forked ProxmoxVE? Run this first!
Quick Start
# Clone your fork
git clone https://github.com/YOUR_USERNAME/ProxmoxVE.git
cd ProxmoxVE
# Run setup script (auto-detects your username from git)
bash docs/contribution/setup-fork.sh --full
That's it! ✅
What Does It Do?
The setup-fork.sh script automatically:
- Detects your GitHub username from git config
- Updates ALL hardcoded links to point to your fork:
- Documentation links pointing to
community-scripts/ProxmoxVE - Curl download URLs in scripts (e.g.,
curl ... github.com/community-scripts/ProxmoxVE/main/...)
- Documentation links pointing to
- Creates
.git-setup-infowith your configuration details - Backs up all modified files (*.backup for safety)
Why Updating Curl Links Matters
Your scripts contain curl commands that download dependencies from GitHub (build.func, tools.func, etc.):
# First line of ct/myapp.sh
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
WITHOUT setup-fork.sh:
- Script URLs still point to
community-scripts/ProxmoxVE/main - If you test locally with
bash ct/myapp.sh, you're testing local files, but the script's curl commands would download from upstream repo - Your modifications aren't actually being tested via the curl commands! ❌
AFTER setup-fork.sh:
- Script URLs are updated to
YourUsername/ProxmoxVE/main - When you test via curl from GitHub:
bash -c "$(curl ... YOUR_USERNAME/ProxmoxVE/main/ct/myapp.sh)", it downloads from your fork - The script's curl commands also point to your fork, so you're actually testing your changes! ✅
- ⏱️ Important: GitHub takes 10-30 seconds to recognize pushed files - wait before testing!
# Example: What setup-fork.sh changes
# BEFORE (points to upstream):
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# AFTER (points to your fork):
source <(curl -fsSL https://raw.githubusercontent.com/john/ProxmoxVE/main/misc/build.func)
Usage
Auto-Detect (Recommended)
bash docs/contribution/setup-fork.sh --full
Automatically reads your GitHub username from git remote origin url
Specify Username
bash docs/contribution/setup-fork.sh --full john
Updates links to github.com/john/ProxmoxVE
Custom Repository Name
bash docs/contribution/setup-fork.sh --full john my-fork
Updates links to github.com/john/my-fork
What Gets Updated?
The script updates hardcoded links in these areas when using --full:
ct/,install/,vm/scriptsmisc/function librariesdocs/(includingdocs/contribution/)- Code examples in documentation
After Setup
-
Review changes
git diff docs/ -
Read git workflow tips
cat .git-setup-info -
Start contributing
git checkout -b feature/my-app # Make your changes... git commit -m "feat: add my awesome app" -
Follow the guide
cat docs/contribution/GUIDE.md
Common Workflows
Keep Your Fork Updated
# Add upstream if you haven't already
git remote add upstream https://github.com/community-scripts/ProxmoxVE.git
# Get latest from upstream
git fetch upstream
git rebase upstream/main
git push origin main
Create a Feature Branch
git checkout -b feature/docker-improvements
# Make changes...
git push origin feature/docker-improvements
# Then create PR on GitHub
Sync Before Contributing
git fetch upstream
git rebase upstream/main
git push -f origin main # Update your fork's main
git checkout -b feature/my-feature
Troubleshooting
"Git is not installed" or "not a git repository"
# Make sure you cloned the repo first
git clone https://github.com/YOUR_USERNAME/ProxmoxVE.git
cd ProxmoxVE
bash docs/contribution/setup-fork.sh --full
"Could not auto-detect GitHub username"
# Your git origin URL isn't set up correctly
git remote -v
# Should show your fork URL, not community-scripts
# Fix it:
git remote set-url origin https://github.com/YOUR_USERNAME/ProxmoxVE.git
bash docs/contribution/setup-fork.sh --full
"Permission denied"
# Make script executable
chmod +x docs/contribution/setup-fork.sh
bash docs/contribution/setup-fork.sh --full
Reverted Changes by Accident?
# Backups are created automatically
git checkout docs/*.backup
# Or just re-run setup-fork.sh
bash docs/contribution/setup-fork.sh --full
Next Steps
- ✅ Run
bash docs/contribution/setup-fork.sh --full - 📖 Read docs/contribution/GUIDE.md
- 🍴 Choose your contribution path:
- Containers → docs/ct/README.md
- Installation → docs/install/README.md
- VMs → docs/vm/README.md
- Tools → docs/tools/README.md
- 💻 Create your feature branch and contribute!
Questions?
- Fork Setup Issues? → See Troubleshooting above
- How to Contribute? → docs/contribution/GUIDE.md
- Git Workflows? →
cat .git-setup-info - Project Structure? → docs/README.md