diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index f450b99b1..12bd44f84 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -8,13 +8,13 @@ body: # 🐞 **Script Issue Report** Thank you for taking the time to report an issue! Please provide as much detail as possible to help us address the problem efficiently. - ## ⚠️ **IMPORTANT** + ## ⚠️ **IMPORTANT - READ FIRST** - 🔍 **Search first:** Before submitting, check if the issue has already been reported or resolved in [closed issues](https://github.com/community-scripts/ProxmoxVE/issues?q=is%3Aissue+is%3Aclosed). If found, comment on that issue instead of creating a new one. Alternatively, check the **[Discussions](https://github.com/community-scripts/ProxmoxVE/discussions)** under the *"Announcement"* or *"Guide"* categories for relevant information. - 🛠️ **Supported environments only:** Ensure you are using a default Linux distribution. Custom setups may not be supported. - 🔎 If you encounter `[ERROR] in line 23: exit code *: while executing command "$@" > /dev/null 2>&1`, rerun the script with verbose mode before submitting the issue. - 💡 For general questions, feature requests, or suggestions, use the [Discussions section](https://github.com/community-scripts/ProxmoxVE/discussions). - + - type: input id: guidelines attributes: diff --git a/.github/autolabeler-config.json b/.github/autolabeler-config.json index 4485d62c9..30e34b972 100644 --- a/.github/autolabeler-config.json +++ b/.github/autolabeler-config.json @@ -50,7 +50,7 @@ "maintenance": [ { "fileStatus": null, - "includeGlobs": ["*.md", ".github/**"], + "includeGlobs": ["*.md", ".github/**", "misc/*.func", "ct/create_lxc.sh"], "excludeGlobs": [] } ], @@ -61,4 +61,4 @@ "excludeGlobs": [] } ] -} \ No newline at end of file +} diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 8e2f5b0bc..7613cf4eb 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,39 +1,28 @@ -> **🛠️ Note:** -> We are meticulous about merging code into the main branch, so please understand that pull requests not meeting the project's standards may be rejected. It's never personal! -> 🎮 **Note for game-related scripts:** These have a lower likelihood of being merged. - ---- - ## ✍️ Description -Provide a summary of the changes made and/or reference the issue being addressed. + - - - -**_Please remove unneeded lines!_** -- Related Issue: # (issue number, if applicable) -- Related PR: # (if applicable) -- Related Discussion: []()(if applicable) +- Related Issue: # +- Related PR: # +- Related Discussion: # +- - - ---- - -## 🛠️ Type of Change -Please check the relevant options: -- [ ] Bug fix (non-breaking change that resolves an issue) -- [ ] New feature (non-breaking change that adds functionality) -- [ ] Breaking change (fix or feature that would cause existing functionality to change unexpectedly) -- [ ] New script (a fully functional and thoroughly tested script or set of scripts) - ---- ## ✅ Prerequisites The following steps must be completed for the pull request to be considered: -- [ ] Self-review performed (I have reviewed my code to ensure it follows established patterns and conventions.) -- [ ] Testing performed (I have thoroughly tested my changes and verified expected functionality.) -- [ ] Documentation updated (I have updated any relevant documentation) +- [] Self-review performed (I have reviewed my code to ensure it follows established patterns and conventions.) +- [] Testing performed (I have thoroughly tested my changes and verified expected functionality.) + +## 🛠️ Type of Change +Please check the relevant options: +- [] Bug fix (non-breaking change that resolves an issue) +- [] New feature (non-breaking change that adds functionality) +- [] Breaking change (fix or feature that would cause existing functionality to change unexpectedly) +- [] New script (a fully functional and thoroughly tested script or set of scripts) --- - ## 📋 Additional Information (optional) Provide any extra context or screenshots about the feature or fix here. diff --git a/.github/workflows/auto-update-app-headers.yml b/.github/workflows/auto-update-app-headers.yml new file mode 100644 index 000000000..b02c3e619 --- /dev/null +++ b/.github/workflows/auto-update-app-headers.yml @@ -0,0 +1,82 @@ +name: Auto Update .app-headers + +on: + push: + branches: + - main + paths: + - 'ct/**.sh' + workflow_dispatch: # Ermöglicht das manuelle Ausführen der Action + +jobs: + update-app-headers: + runs-on: ubuntu-latest + + permissions: + contents: write + pull-requests: write + + steps: + # Step 1: Checkout repository + - name: Checkout repository + uses: actions/checkout@v2 + + # Step 2: Set up Git user for committing changes + - name: Set up Git + run: | + git config --global user.name "GitHub Actions" + git config --global user.email "actions@github.com" + + # Step 3: Install figlet + - name: Install figlet + run: sudo apt-get install -y figlet + + # Step 4: Run the generate-app-headers.sh script to update .app-headers + - name: Run generate-app-headers.sh to update .app-headers + run: | + chmod +x .github/workflows/scripts/generate-app-headers.sh + .github/workflows/scripts/generate-app-headers.sh + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # Step 5: Check if there are any changes + - name: Check if there are any changes + id: verify-diff + run: | + git diff --quiet . || echo "changed=true" >> $GITHUB_OUTPUT + + # Step 6: Commit changes (if any) and create a PR + - name: Commit and create PR if changes exist + if: steps.verify-diff.outputs.changed == 'true' + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git add ./misc/.app-headers + git commit -m "Update .app-headers file" + # Create a temporary branch for the PR + git checkout -b pr-update-app-headers + git push origin pr-update-app-headers --force + + # Create PR against main + gh pr create --title "[core] update .app-headers file" \ + --body "This PR is auto-generated by a Github Action to update the .app-headers file." \ + --head pr-update-app-headers \ + --base main \ + --label "automated pr" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Re-approve pull request after update + if: steps.verify-diff.outputs.changed == 'true' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + PR_NUMBER=$(gh pr list --head "pr-update-app-headers" --json number --jq '.[].number') + # Check if the PR was created by the bot (skip review if so) + PR_AUTHOR=$(gh pr view "$PR_NUMBER" --json author --jq '.author.login') + if [ "$PR_AUTHOR" != "github-actions[bot]" ]; then + gh pr review "$PR_NUMBER" --approve + else + echo "PR was created by the bot, skipping review." + fi + diff --git a/.github/workflows/backup/check_and_update_json_date.yml b/.github/workflows/backup/check_and_update_json_date.yml new file mode 100644 index 000000000..cde3cbbad --- /dev/null +++ b/.github/workflows/backup/check_and_update_json_date.yml @@ -0,0 +1,60 @@ +name: Update date_created in JSON files + +on: + # Dieser Trigger wird für das Öffnen von PRs sowie für das Aktualisieren von offenen PRs verwendet + pull_request: + types: [opened, synchronize] + schedule: + # Dieser Trigger wird 4x am Tag ausgelöst, um sicherzustellen, dass das Datum aktualisiert wird + - cron: "0 0,6,12,18 * * *" # Führt alle 6 Stunden aus + workflow_dispatch: # Manuelle Ausführung des Workflows möglich + +jobs: + update-date: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install yq + run: | + sudo apt-get update + sudo apt-get install -y yq + + - name: Set the current date + id: set_date + run: echo "TODAY=$(date -u +%Y-%m-%d)" >> $GITHUB_ENV + + - name: Check for changes in PR + run: | + # Hole den PR-Branch + PR_BRANCH="refs/pull/${{ github.event.pull_request.number }}/merge" + git fetch origin $PR_BRANCH + + # Liste alle JSON-Dateien im PR auf, die geändert wurden + CHANGED_JSON_FILES=$(git diff --name-only origin/main...$PR_BRANCH | grep '.json') + + if [ -z "$CHANGED_JSON_FILES" ]; then + echo "No JSON files changed in this PR." + exit 0 + fi + + # Gehe alle geänderten JSON-Dateien durch und aktualisiere das Datum + for file in $CHANGED_JSON_FILES; do + echo "Updating date_created in $file" + # Setze das aktuelle Datum + yq eval ".date_created = \"${{ env.TODAY }}\"" -i "$file" + git add "$file" + done + + - name: Commit and push changes + run: | + # Prüfe, ob es Änderungen gibt und committe sie + git config user.name "json-updater-bot" + git config user.email "github-actions[bot]@users.noreply.github.com" + + git commit -m "Update date_created to ${{ env.TODAY }}" || echo "No changes to commit" + + # Push zurück in den PR-Branch + git push origin $PR_BRANCH diff --git a/.github/workflows/backup/shellcheck.yml b/.github/workflows/backup/shellcheck.yml new file mode 100644 index 000000000..4385fc8e9 --- /dev/null +++ b/.github/workflows/backup/shellcheck.yml @@ -0,0 +1,60 @@ +name: Shellcheck + +on: + push: + branches: + - main + pull_request: + workflow_dispatch: + schedule: + - cron: "5 1 * * *" + +jobs: + shellcheck: + name: Shellcheck + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v45 + with: + files: | + **.sh + + - name: Download ShellCheck + shell: bash + env: + INPUT_VERSION: "v0.10.0" + run: | + set -euo pipefail + if [[ "${{ runner.os }}" == "macOS" ]]; then + osvariant="darwin" + else + osvariant="linux" + fi + + baseurl="https://github.com/koalaman/shellcheck/releases/download" + curl -Lso "${{ github.workspace }}/sc.tar.xz" \ + "${baseurl}/${INPUT_VERSION}/shellcheck-${INPUT_VERSION}.${osvariant}.x86_64.tar.xz" + + tar -xf "${{ github.workspace }}/sc.tar.xz" -C "${{ github.workspace }}" + mv "${{ github.workspace }}/shellcheck-${INPUT_VERSION}/shellcheck" \ + "${{ github.workspace }}/shellcheck" + + - name: Verify ShellCheck binary + run: | + ls -l "${{ github.workspace }}/shellcheck" + + - name: Display ShellCheck version + run: | + "${{ github.workspace }}/shellcheck" --version + + - name: Run ShellCheck + if: steps.changed-files.outputs.any_changed == 'true' + env: + ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} + run: | + echo "${ALL_CHANGED_FILES}" | xargs "${{ github.workspace }}/shellcheck" diff --git a/.github/workflows/scripts/update_json_date.sh b/.github/workflows/scripts/update_json_date.sh new file mode 100644 index 000000000..d07eab711 --- /dev/null +++ b/.github/workflows/scripts/update_json_date.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +# Verzeichnis, das die JSON-Dateien enthält +json_dir="./json/*.json" + +current_date=$(date +"%Y-%m-%d") + +for json_file in $json_dir; do + if [[ -f "$json_file" ]]; then + current_json_date=$(jq -r '.date_created' "$json_file") + + if [[ "$current_json_date" != "$current_date" ]]; then + echo "Updating $json_file with date $current_date" + jq --arg date "$current_date" '.date_created = $date' "$json_file" > temp.json && mv temp.json "$json_file" + + git add "$json_file" + git commit -m "Update date_created to $current_date in $json_file" + else + echo "Date in $json_file is already up to date." + fi + fi +done +git push origin HEAD diff --git a/.github/workflows/update_json_date.yml b/.github/workflows/update_json_date.yml new file mode 100644 index 000000000..afaf8eda2 --- /dev/null +++ b/.github/workflows/update_json_date.yml @@ -0,0 +1,48 @@ +name: Update JSON Date +on: + pull_request: + types: [opened, synchronize, reopened] + +jobs: + list-files: + runs-on: ubuntu-latest + steps: + - name: Checkout PR Branch + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.ref }} + + - name: Fetch PR changes + run: | + git remote add fork https://github.com/${{ github.event.pull_request.head.repo.full_name }}.git + git fetch fork ${{ github.event.pull_request.head.ref }}:pullreq + git checkout pullreq + + - name: Update JSON + id: changed-files + run: | + FILES=$(gh api repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files --jq '.[].filename' | tr '\n' ' ') + echo "changed_files=${FILES}" + for FILE in $FILES; do + if [[ "$FILE" =~ /(.*)\.json ]]; then + NAME="${BASH_REMATCH[1]}" + else + echo "no new JSON in ${FILES}" + continue + fi + + JSON_FILE="json/${NAME}.json" + if [[ -f "$JSON_FILE" ]]; then + echo "Updating date_created in $JSON_FILE" + jq --arg date "$(date +%Y-%m-%d)" '.date_created = $date' "$JSON_FILE" > tmp.json && mv tmp.json "$JSON_FILE" + else + echo "JSON file $FILES not found" + fi + done + + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git diff --exit-code || git commit -am "Updating Dates in affected JSON files." + git push + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index ce0ebc224..98a625026 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,104 @@ All LXC instances created using this repository come pre-installed with Midnight > [!IMPORTANT] Do not break established syntax in this file, as it is automatically updated by a Github Workflow +## 2025-01-16 + +### Changed + +### 💥 Breaking Changes + +- Update jellyseerr-install.sh to use Node 22 as required by latest Jellyseerr version [@pedrovieira](https://github.com/pedrovieira) ([#1535](https://github.com/community-scripts/ProxmoxVE/pull/1535)) + +### ✨ New Scripts + +- New script: Dotnet ASP.NET Web Server [@kris701](https://github.com/kris701) ([#1501](https://github.com/community-scripts/ProxmoxVE/pull/1501)) +- New script: phpIPAM [@bvdberg01](https://github.com/bvdberg01) ([#1503](https://github.com/community-scripts/ProxmoxVE/pull/1503)) + +### 🌐 Website + +- Add Mobile check for empty icon-url on website [@MickLesk](https://github.com/MickLesk) ([#1532](https://github.com/community-scripts/ProxmoxVE/pull/1532)) + +### 🧰 Maintenance + +- [Workflow]Update autolabeler-config.json [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1525](https://github.com/community-scripts/ProxmoxVE/pull/1525)) +- [core]Update update_json_date.yml [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1526](https://github.com/community-scripts/ProxmoxVE/pull/1526)) +- [core] Recreate Update JSON Workflow [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1523](https://github.com/community-scripts/ProxmoxVE/pull/1523)) + +## 2025-01-15 + +### Changed + +### 🚀 Updated Scripts + +- Fix: Add FFMPEG for OpenWebUI [@MickLesk](https://github.com/MickLesk) ([#1497](https://github.com/community-scripts/ProxmoxVE/pull/1497)) + +### 🧰 Maintenance + +- [core] build.func&install.func: Fix ssh keynot added error [@dsiebel](https://github.com/dsiebel) ([#1502](https://github.com/community-scripts/ProxmoxVE/pull/1502)) + +## 2025-01-14 + +### Changed + +### 💥 Breaking Changes + +- Update tianji-install.sh: Add OPENAI_API_KEY to .env [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1480](https://github.com/community-scripts/ProxmoxVE/pull/1480)) + +### ✨ New Scripts + +- New Script: Wordpress [@MickLesk](https://github.com/MickLesk) ([#1485](https://github.com/community-scripts/ProxmoxVE/pull/1485)) +- New Script: Opengist [@jd-apprentice](https://github.com/jd-apprentice) ([#1429](https://github.com/community-scripts/ProxmoxVE/pull/1429)) + +### 🚀 Updated Scripts + +- Update lazylibrarian-install.sh: Add pypdf libary [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1467](https://github.com/community-scripts/ProxmoxVE/pull/1467)) +- Update opengist-install.sh: Add git as dependencie [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1471](https://github.com/community-scripts/ProxmoxVE/pull/1471)) + +### 🌐 Website + +- [website] Update footer text [@rajatdiptabiswas](https://github.com/rajatdiptabiswas) ([#1466](https://github.com/community-scripts/ProxmoxVE/pull/1466)) + +### 🧰 Maintenance + +- Hotfix build.func: Error when tags are empty [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1492](https://github.com/community-scripts/ProxmoxVE/pull/1492)) +- [core] Update build.func: Fix bug with advanced tags [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1473](https://github.com/community-scripts/ProxmoxVE/pull/1473)) + +## 2025-01-13 + +### Changed + +### 💥 Breaking Changes + +- Update Hoarder: Improvement .env location (see PR comment for little migration) [@MahrWe](https://github.com/MahrWe) ([#1325](https://github.com/community-scripts/ProxmoxVE/pull/1325)) + +### 🚀 Updated Scripts + +- Fix: tandoor.sh: Call version.py to write current version [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1454](https://github.com/community-scripts/ProxmoxVE/pull/1454)) +- Fix inexistent folder on actualbudget update script [@dosten](https://github.com/dosten) ([#1444](https://github.com/community-scripts/ProxmoxVE/pull/1444)) + +### 🌐 Website + +- Update kavita.json: Add info on how to enable folder adding. [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1447](https://github.com/community-scripts/ProxmoxVE/pull/1447)) + +### 🧰 Maintenance + +- GitHub Actions: Fix Shellsheck workflow to only run on changes `*.sh` files [@andygrunwald](https://github.com/andygrunwald) ([#1423](https://github.com/community-scripts/ProxmoxVE/pull/1423)) + +### ❔ Unlabelled + +- feat: allow adding SSH authorized key for root (advanced settings) by @dsiebel [@MickLesk](https://github.com/MickLesk) ([#1456](https://github.com/community-scripts/ProxmoxVE/pull/1456)) + +## 2025-01-11 + +### Changed + +### 🚀 Updated Scripts + +- Prometheus: Fix installation via creating the service file [@andygrunwald](https://github.com/andygrunwald) ([#1416](https://github.com/community-scripts/ProxmoxVE/pull/1416)) +- Update prometheus-install.sh: Service creation fix [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1417](https://github.com/community-scripts/ProxmoxVE/pull/1417)) +- Update prometheus-alertmanager-install.sh: Service Creation Fix [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1418](https://github.com/community-scripts/ProxmoxVE/pull/1418)) +- Fix: LubeLogger CT vehicle tag typo [@kkroboth](https://github.com/kkroboth) ([#1413](https://github.com/community-scripts/ProxmoxVE/pull/1413)) + ## 2025-01-10 ### Changed @@ -26,6 +124,7 @@ Do not break established syntax in this file, as it is automatically updated by ### 🚀 Updated Scripts +- Fix user in ghost-cli install command [@fabrice1236](https://github.com/fabrice1236) ([#1408](https://github.com/community-scripts/ProxmoxVE/pull/1408)) - Update Prometheus + Alertmanager: Unify scripts for easier maintenance [@andygrunwald](https://github.com/andygrunwald) ([#1402](https://github.com/community-scripts/ProxmoxVE/pull/1402)) - Update komodo.sh: Fix broken paths in update_script(). [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1403](https://github.com/community-scripts/ProxmoxVE/pull/1403)) - Fix: ActualBudget Update-Function [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1376](https://github.com/community-scripts/ProxmoxVE/pull/1376)) diff --git a/ct/actualbudget.sh b/ct/actualbudget.sh index 7aee9bd65..79b264ef2 100644 --- a/ct/actualbudget.sh +++ b/ct/actualbudget.sh @@ -45,6 +45,7 @@ function update_script() { cd "${TEMPD}" wget -q https://codeload.github.com/actualbudget/actual-server/legacy.tar.gz/refs/tags/${RELEASE} -O - | tar -xz mv /opt/actualbudget /opt/actualbudget_bak + mkdir -p /opt/actualbudget/ mv actualbudget-actual-server-*/* /opt/actualbudget/ mv /opt/actualbudget_bak/.env /opt/actualbudget mv /opt/actualbudget_bak/server-files /opt/actualbudget/server-files diff --git a/ct/dotnetaspwebapi.sh b/ct/dotnetaspwebapi.sh new file mode 100644 index 000000000..faf86d296 --- /dev/null +++ b/ct/dotnetaspwebapi.sh @@ -0,0 +1,49 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Kristian Skov +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-9.0&tabs=linux-ubuntu + +# App Default Values +APP="Dotnet ASP Web API" +var_tags="web" +var_cpu="1" +var_ram="1024" +var_disk="8" +var_os="ubuntu" +var_version="24.04" +var_unprivileged="0" + +# App Output & Base Settings +header_info "$APP" +base_settings + +# Core +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /var/www ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP} LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated Successfully" + exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" +echo -e "${INFO}${YW} Access it using the following IP:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}${IP}:80${CL}" diff --git a/ct/hoarder.sh b/ct/hoarder.sh index c05f6bb0a..4dd931bd1 100644 --- a/ct/hoarder.sh +++ b/ct/hoarder.sh @@ -40,7 +40,10 @@ function update_script() { msg_ok "Stopped Services" msg_info "Updating ${APP} to v${RELEASE}" cd /opt - mv /opt/hoarder/.env /opt/.env + if [[ -f /opt/hoarder/.env ]] && [[ ! -f /etc/hoarder/hoarder.env ]]; then + mkdir -p /etc/hoarder + mv /opt/hoarder/.env /etc/hoarder/hoarder.env + fi rm -rf /opt/hoarder wget -q "https://github.com/hoarder-app/hoarder/archive/refs/tags/v${RELEASE}.zip" unzip -q v${RELEASE}.zip @@ -54,8 +57,7 @@ function update_script() { export DATA_DIR=/opt/hoarder_data cd /opt/hoarder/packages/db pnpm migrate &>/dev/null - mv /opt/.env /opt/hoarder/.env - sed -i "s/SERVER_VERSION=${PREV_RELEASE}/SERVER_VERSION=${RELEASE}/" /opt/hoarder/.env + sed -i "s/SERVER_VERSION=${PREV_RELEASE}/SERVER_VERSION=${RELEASE}/" /etc/hoarder/hoarder.env msg_ok "Updated ${APP} to v${RELEASE}" msg_info "Starting Services" @@ -79,4 +81,4 @@ description msg_ok "Completed Successfully!\n" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${INFO}${YW} Access it using the following URL:${CL}" -echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}" \ No newline at end of file +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}" diff --git a/ct/lubelogger.sh b/ct/lubelogger.sh index 4f8a56d8c..cd6e85d1c 100644 --- a/ct/lubelogger.sh +++ b/ct/lubelogger.sh @@ -7,7 +7,7 @@ source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/b # App Default Values APP="LubeLogger" -var_tags="verhicle;car" +var_tags="vehicle;car" var_cpu="1" var_ram="512" var_disk="2" diff --git a/ct/opengist.sh b/ct/opengist.sh new file mode 100644 index 000000000..65b586b43 --- /dev/null +++ b/ct/opengist.sh @@ -0,0 +1,71 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Jonathan (jd-apprentice) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://opengist.io/ + +# App Default Values +APP="Opengist" +var_tags="development" +var_cpu="1" +var_ram="1024" +var_disk="8" +var_os="debian" +var_version="12" +var_unprivileged="1" + +# App Output & Base Settings +header_info "$APP" +base_settings + +# Core +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /opt/opengist ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Stopping Service" + systemctl stop opengist.service + msg_ok "Stopped Service" + apt-get update &>/dev/null + apt-get upgrade &>/dev/null + RELEASE=$(curl -s https://api.github.com/repos/thomiceli/opengist/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then + msg_info "Updating ${APP} to v${RELEASE}" + cd /opt + wget -qO "https://github.com/thomiceli/opengist/releases/download/v${RELEASE}/opengist${RELEASE}-linux-amd64.tar.gz" + rm -rf /opt/opengist + tar -xzf opengist${RELEASE}-linux-amd64.tar.gz + chmod +x /opt/opengist/opengist + echo "${RELEASE}" >"/opt/${APP}_version.txt" + rm -rf /opt/opengist${RELEASE}-linux-amd64.tar.gz + apt-get -y autoremove &>/dev/null + apt-get -y autoclean &>/dev/null + msg_ok "Updated ${APP} LXC" + + msg_info "Starting Service" + systemctl start opengist.service + msg_ok "Started Service" + + else + msg_ok "No update required. ${APP} is already at v${RELEASE}." + fi + exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" +echo -e "${INFO}${YW} Access it using the following URL:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:6157${CL}" diff --git a/ct/phpipam.sh b/ct/phpipam.sh new file mode 100644 index 000000000..cf9905fde --- /dev/null +++ b/ct/phpipam.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: bvdberg01 +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://phpipam.net/ + +# App Default Values +APP="phpIPAM" +var_tags="network" +var_cpu="1" +var_ram="512" +var_disk="4" +var_os="debian" +var_version="12" +var_unprivileged="1" + +# App Output & Base Settings +header_info "$APP" +base_settings + +# Core +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /opt/phpipam ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + RELEASE=$(curl -s https://api.github.com/repos/phpipam/phpipam/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then + msg_info "Stopping Service" + systemctl stop apache2 + msg_ok "Stopped Service" + + msg_info "Updating ${APP} to v${RELEASE}" + cd /opt + mv /opt/phpipam/ /opt/phpipam-backup + wget -q "https://github.com/phpipam/phpipam/releases/download/v${RELEASE}/phpipam-v${RELEASE}.zip" + unzip -q "phpipam-v${RELEASE}.zip" + cp /opt/phpipam-backup/config.php /opt/phpipam + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated $APP to v${RELEASE}" + + msg_info "Starting Service" + systemctl start apache2 + msg_ok "Started Service" + + msg_info "Cleaning up" + rm -r "/opt/phpipam-v${RELEASE}.zip" + rm -r /opt/phpipam-backup + msg_ok "Cleaned" + msg_ok "Updated Successfully" + else + msg_ok "No update required. ${APP} is already at v${RELEASE}" + fi + exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" +echo -e "${INFO}${YW} Access it using the following URL:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}" diff --git a/ct/tandoor.sh b/ct/tandoor.sh index b55586b87..2f03e6cd9 100644 --- a/ct/tandoor.sh +++ b/ct/tandoor.sh @@ -45,6 +45,8 @@ function update_script() { cd /opt/tandoor/vue yarn install >/dev/null 2>&1 yarn build >/dev/null 2>&1 + cd /opt/tandoor + python3 version.py &>/dev/null systemctl restart gunicorn_tandoor msg_ok "Updated ${APP}" fi @@ -58,4 +60,4 @@ description msg_ok "Completed Successfully!\n" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${INFO}${YW} Access it using the following URL:${CL}" -echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8002${CL}" \ No newline at end of file +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8002${CL}" diff --git a/ct/wordpress.sh b/ct/wordpress.sh new file mode 100644 index 000000000..8ff69de17 --- /dev/null +++ b/ct/wordpress.sh @@ -0,0 +1,45 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 communtiy-scripts ORG +# Author: MickLesk (Canbiz) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://wordpress.org/ + +## App Default Values +APP="Wordpress" +var_tags="blog;cms" +var_disk="5" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="12" + +# App Output & Base Settings +header_info "$APP" +base_settings + +# Core +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /var/www/html/wordpress ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_error "Wordpress should be updated via the user interface." + exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${CREATING}${GN} ${APP} setup has been successfully initialized!${CL}" +echo -e "${INFO}${YW} Access it using the following URL:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}/${CL}" \ No newline at end of file diff --git a/frontend/src/components/Footer.tsx b/frontend/src/components/Footer.tsx index 83aa05cec..38a93803c 100644 --- a/frontend/src/components/Footer.tsx +++ b/frontend/src/components/Footer.tsx @@ -6,7 +6,7 @@ export default function Footer() {
- Website build by the community. The source code is avaliable on{" "} + Website built by the community. The source code is avaliable on{" "} , text: "Github", @@ -18,18 +21,20 @@ export const navbarLinks = [ text: "Discord", }, { - href: `https://github.com/asylumexp/${basePath}/blob/main/CHANGELOG.md`, + href: `https://github.com/asylumexp/Proxmox/blob/main/CHANGELOG.md`, event: "Change Log", icon: , text: "Change Log", }, - { - href: `https://github.com/asylumexp/${basePath}/discussions`, - event: "Discussions", - icon: , - text: "Discussions", - }, -]; + !isMobile + ? { + href: `https://github.com/asylumexp/Proxmox/discussions`, + event: "Discussions", + icon: , + text: "Discussions", + } + : null, +].filter(Boolean) as { href: string; event: string; icon: React.ReactNode; text: string }[]; export const mostPopularScripts = [ "Proxmox VE Post Install", diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json index dde88af64..4b269df34 100644 --- a/frontend/tsconfig.json +++ b/frontend/tsconfig.json @@ -10,7 +10,7 @@ "moduleResolution": "bundler", "resolveJsonModule": true, "isolatedModules": true, - "jsx": "preserve", + "jsx": "react-jsx", "incremental": true, "plugins": [ { @@ -27,7 +27,7 @@ "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", - "next.config.mjs", + "next.config.mjs" ], "exclude": ["node_modules"] } diff --git a/install/dotnetaspwebapi-install.sh b/install/dotnetaspwebapi-install.sh new file mode 100644 index 000000000..1aeee7aa7 --- /dev/null +++ b/install/dotnetaspwebapi-install.sh @@ -0,0 +1,110 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Kristian Skov +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE + +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get update +$STD apt-get install -y \ + ssh \ + software-properties-common +$STD add-apt-repository -y ppa:dotnet/backports +$STD apt-get install -y \ + dotnet-sdk-9.0 \ + vsftpd \ + nginx +msg_ok "Installed Dependencies" + +msg_info "Configure Application" +var_project_name="default" +read -r -p "Type the assembly name of the project: " var_project_name +echo "Target assembly: '${var_project_name}'" +msg_ok "Application Configured" + +msg_info "Setting up FTP Server" +useradd ftpuser +FTP_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) +usermod --password $(echo ${FTP_PASS} | openssl passwd -1 -stdin) ftpuser +mkdir -p /var/www/html +usermod -d /var/www/html ftp +usermod -d /var/www/html ftpuser +chown ftpuser /var/www/html + +sed -i "s|#write_enable=YES|write_enable=YES|g" /etc/vsftpd.conf +sed -i "s|#chroot_local_user=YES|chroot_local_user=NO|g" /etc/vsftpd.conf + +systemctl restart -q vsftpd.service + +{ + echo "FTP-Credentials" + echo "Username: ftpuser" + echo "Password: $FTP_PASS" +} >> ~/ftp.creds + +msg_ok "FTP server setup completed" + +msg_info "Setting up Nginx Server" +rm -f /var/www/html/index.nginx-debian.html + +sed "s/\$var_project_name/$var_project_name/g" >myfile <<'EOF' >/etc/nginx/sites-available/default +map $http_connection $connection_upgrade { + "~*Upgrade" $http_connection; + default keep-alive; +} +server { + listen 80; + server_name $var_project_name.com *.$var_project_name.com; + location / { + proxy_pass http://127.0.0.1:5000/; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + proxy_set_header Host $host; + proxy_cache_bypass $http_upgrade; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } +} +EOF +systemctl reload nginx +msg_ok "Nginx Server Created" + +msg_info "Creating Service" +cat </etc/systemd/system/kestrel-aspnetapi.service +[Unit] +Description=.NET Web API App running on Linux + +[Service] +WorkingDirectory=/var/www/html +ExecStart=/usr/bin/dotnet /var/www/html/$var_project_name.dll +Restart=always +# Restart service after 10 seconds if the dotnet service crashes: +RestartSec=10 +KillSignal=SIGINT +SyslogIdentifier=dotnet-${var_project_name} +User=root +Environment=ASPNETCORE_ENVIRONMENT=Production +Environment=DOTNET_NOLOGO=true + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now kestrel-aspnetapi.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/install/hoarder-install.sh b/install/hoarder-install.sh index c0bc903b2..238a8a913 100644 --- a/install/hoarder-install.sh +++ b/install/hoarder-install.sh @@ -80,7 +80,8 @@ $STD pnpm install --frozen-lockfile export DATA_DIR=/opt/hoarder_data HOARDER_SECRET=$(openssl rand -base64 36 | cut -c1-24) -cat </opt/hoarder/.env +mkdir -p /etc/hoarder +cat </etc/hoarder/hoarder.env SERVER_VERSION=$RELEASE NEXTAUTH_SECRET="$HOARDER_SECRET" NEXTAUTH_URL="http://localhost:3000" @@ -131,7 +132,7 @@ After=network.target hoarder-workers.service [Service] ExecStart=pnpm start WorkingDirectory=/opt/hoarder/apps/web -EnvironmentFile=/opt/hoarder/.env +EnvironmentFile=/etc/hoarder/hoarder.env Restart=always [Install] @@ -161,7 +162,7 @@ After=network.target hoarder-browser.service meilisearch.service [Service] ExecStart=pnpm start:prod WorkingDirectory=/opt/hoarder/apps/workers -EnvironmentFile=/opt/hoarder/.env +EnvironmentFile=/etc/hoarder/hoarder.env Restart=always TimeoutStopSec=5 diff --git a/install/jellyseerr-install.sh b/install/jellyseerr-install.sh index 91cd0e482..3cb29dcd0 100644 --- a/install/jellyseerr-install.sh +++ b/install/jellyseerr-install.sh @@ -26,7 +26,7 @@ msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" diff --git a/install/lazylibrarian-install.sh b/install/lazylibrarian-install.sh index 09bef0c3f..06377ab6c 100644 --- a/install/lazylibrarian-install.sh +++ b/install/lazylibrarian-install.sh @@ -36,6 +36,7 @@ rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED $STD pip install jaraco.stream $STD pip install python-Levenshtein $STD pip install soupsieve +$STD pip install pypdf msg_ok "Installed Python3 Dependencies" msg_info "Installing LazyLibrarian" diff --git a/install/opengist-install.sh b/install/opengist-install.sh new file mode 100644 index 000000000..7893819f9 --- /dev/null +++ b/install/opengist-install.sh @@ -0,0 +1,61 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Jonathan (jd-apprentice) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get install -y \ + mc \ + curl \ + sudo \ + git +msg_ok "Installed Dependencies" + +msg_info "Install Opengist" +RELEASE=$(curl -s https://api.github.com/repos/thomiceli/opengist/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" +wget -q "https://github.com/thomiceli/opengist/releases/download/v${RELEASE}/opengist${RELEASE}-linux-amd64.tar.gz" +$STD tar -xzf opengist${RELEASE}-linux-amd64.tar.gz +mv opengist /opt/opengist +chmod +x /opt/opengist/opengist +mkdir -p /opt/opengist-data +msg_ok "Installed Opengist" + +msg_info "Creating Service" + +sed -i 's|opengist-home:.*|opengist-home: /opt/opengist-data|' /opt/opengist/config.yml + +cat </etc/systemd/system/opengist.service +[Unit] +Description=Opengist server to manage your Gists +After=network.target + +[Service] +WorkingDirectory=/opt/opengist +ExecStart=/opt/opengist/opengist --config /opt/opengist/config.yml +Restart=always +User=root + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now opengist.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf /opengist${RELEASE}-linux-amd64.tar.gz +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/install/openwebui-install.sh b/install/openwebui-install.sh index 84ce4054f..3aa9b1b81 100644 --- a/install/openwebui-install.sh +++ b/install/openwebui-install.sh @@ -15,13 +15,15 @@ network_check update_os msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y gpg -$STD apt-get install -y git -$STD apt-get install -y wget -$STD apt-get install -y openssh-server +$STD apt-get install -y \ + curl \ + sudo \ + mc \ + gpg \ + git \ + ffmpeg \ + wget \ + openssh-server msg_ok "Installed Dependencies" msg_info "Installing Python3 Dependencies" diff --git a/install/phpipam-install.sh b/install/phpipam-install.sh new file mode 100644 index 000000000..a1343c97a --- /dev/null +++ b/install/phpipam-install.sh @@ -0,0 +1,86 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: bvdberg01 +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE + +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get install -y \ + curl \ + sudo \ + mc \ + mariadb-server \ + apache2 \ + libapache2-mod-php \ + php8.2 php8.2-{fpm,curl,cli,mysql,gd,intl,imap,apcu,pspell,tidy,xmlrpc,mbstring,gmp,xml,ldap,common,snmp} \ + php-pear +msg_ok "Installed Dependencies" + +msg_info "Setting up MariaDB" +DB_NAME=phpipam +DB_USER=phpipam +DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) +$STD mysql -u root -e "CREATE DATABASE $DB_NAME;" +$STD mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED WITH mysql_native_password AS PASSWORD('$DB_PASS');" +$STD mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;" +{ + echo "phpIPAM-Credentials" + echo "phpIPAM Database User: $DB_USER" + echo "phpIPAM Database Password: $DB_PASS" + echo "phpIPAM Database Name: $DB_NAME" +} >> ~/phpipam.creds +msg_ok "Set up MariaDB" + +msg_info "Installing phpIPAM" +RELEASE=$(curl -s https://api.github.com/repos/phpipam/phpipam/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +cd /opt +wget -q "https://github.com/phpipam/phpipam/releases/download/v${RELEASE}/phpipam-v${RELEASE}.zip" +unzip -q "phpipam-v${RELEASE}.zip" +mysql -u root "${DB_NAME}" < /opt/phpipam/db/SCHEMA.sql +cp /opt/phpipam/config.dist.php /opt/phpipam/config.php +sed -i -e "s/\(\$disable_installer = \).*/\1true;/" \ + -e "s/\(\$db\['user'\] = \).*/\1'$DB_USER';/" \ + -e "s/\(\$db\['pass'\] = \).*/\1'$DB_PASS';/" \ + -e "s/\(\$db\['name'\] = \).*/\1'$DB_NAME';/" \ + /opt/phpipam/config.php +sed -i '/max_execution_time/s/= .*/= 600/' /etc/php/8.2/apache2/php.ini +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +msg_ok "Installed phpIPAM" + +msg_info "Creating Service" +cat </etc/apache2/sites-available/phpipam.conf + + ServerName phpipam + DocumentRoot /opt/phpipam + + Options FollowSymLinks + AllowOverride All + Require all granted + + + ErrorLog /var/log/apache2/phpipam_error.log + CustomLog /var/log/apache2/phpipam_access.log combined + +EOF +$STD a2ensite phpipam +$STD a2enmod rewrite +$STD a2dissite 000-default.conf +$STD systemctl reload apache2 +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf "/opt/phpipam-v${RELEASE}.zip" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/install/prometheus-alertmanager-install.sh b/install/prometheus-alertmanager-install.sh index 3ce9dc0a0..ad854ccdc 100755 --- a/install/prometheus-alertmanager-install.sh +++ b/install/prometheus-alertmanager-install.sh @@ -33,7 +33,7 @@ msg_ok "Installed Prometheus Alertmanager" msg_info "Creating Service" cat </etc/systemd/system/prometheus-alertmanager.service -echo "[Unit] +[Unit] Description=Prometheus Alertmanager Wants=network-online.target After=network-online.target @@ -49,7 +49,7 @@ ExecStart=/usr/local/bin/alertmanager \ ExecReload=/bin/kill -HUP \$MAINPID [Install] -WantedBy=multi-user.target" +WantedBy=multi-user.target EOF systemctl enable -q --now prometheus-alertmanager msg_ok "Created Service" diff --git a/install/prometheus-install.sh b/install/prometheus-install.sh index 3b6c2139a..7dc6d008b 100644 --- a/install/prometheus-install.sh +++ b/install/prometheus-install.sh @@ -34,8 +34,8 @@ echo "${RELEASE}" >/opt/${APPLICATION}_version.txt msg_ok "Installed Prometheus" msg_info "Creating Service" -cat </etc/systemd/system/prometheus.service" -echo "[Unit] +cat </etc/systemd/system/prometheus.service +[Unit] Description=Prometheus Wants=network-online.target After=network-online.target @@ -50,7 +50,7 @@ ExecStart=/usr/local/bin/prometheus \ --web.listen-address=0.0.0.0:9090 [Install] -WantedBy=multi-user.target" +WantedBy=multi-user.target EOF systemctl enable -q --now prometheus msg_ok "Created Service" diff --git a/install/tianji-install.sh b/install/tianji-install.sh index 950c9679d..2b63881ed 100644 --- a/install/tianji-install.sh +++ b/install/tianji-install.sh @@ -76,6 +76,7 @@ $STD pnpm build:server echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" cat </opt/tianji/src/server/.env DATABASE_URL="postgresql://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME?schema=public" +OPENAI_API_KEY="" JWT_SECRET="$TIANJI_SECRET" EOF cd /opt/tianji/src/server diff --git a/install/wordpress-install.sh b/install/wordpress-install.sh new file mode 100644 index 000000000..665b105ab --- /dev/null +++ b/install/wordpress-install.sh @@ -0,0 +1,85 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 communtiy-scripts ORG +# Author: MickLesk (Canbiz) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://wordpress.org/ + +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies (Patience)" +$STD apt-get install -y \ + curl \ + unzip \ + sudo \ + mc \ + apache2 \ + php8.2-{bcmath,common,cli,curl,fpm,gd,snmp,imap,mbstring,mysql,xml,zip} \ + libapache2-mod-php \ + mariadb-server + msg_ok "Installed Dependencies" + +msg_info "Setting up Database" +DB_NAME=wordpress_db +DB_USER=wordpress +DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) +$STD mysql -u root -e "CREATE DATABASE $DB_NAME;" +$STD mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';" +$STD mysql -u root -e "GRANT ALL PRIVILEGES ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;" +{ + echo "WordPress Credentials" + echo "Database User: $DB_USER" + echo "Database Password: $DB_PASS" + echo "Database Name: $DB_NAME" +} >> ~/wordpress.creds +msg_ok "Set up Database" + +msg_info "Installing Wordpress (Patience)" +cd /var/www/html +wget -q https://wordpress.org/latest.zip +unzip -q latest.zip +chown -R www-data:www-data wordpress/ +cd /var/www/html/wordpress +find . -type d -exec chmod 755 {} \; +find . -type f -exec chmod 644 {} \; +mv wp-config-sample.php wp-config.php +sed -i -e "s|^define( 'DB_NAME', '.*' );|define( 'DB_NAME', '$DB_NAME' );|" \ + -e "s|^define( 'DB_USER', '.*' );|define( 'DB_USER', '$DB_USER' );|" \ + -e "s|^define( 'DB_PASSWORD', '.*' );|define( 'DB_PASSWORD', '$DB_PASS' );|" \ + /var/www/html/wordpress/wp-config.php +msg_ok "Installed Wordpress" + +msg_info "Setup Services" +cat < /etc/apache2/sites-available/wordpress.conf + + ServerName yourdomain.com + DocumentRoot /var/www/html/wordpress + + + AllowOverride All + + + ErrorLog \${APACHE_LOG_DIR}/error.log + CustomLog \${APACHE_LOG_DIR}/access.log combined + + +EOF +$STD a2ensite wordpress.conf +$STD a2dissite 000-default.conf +systemctl reload apache2 +msg_ok "Created Services" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf /var/www/html/latest.zip +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" \ No newline at end of file diff --git a/json/dotnetaspwebapi.json b/json/dotnetaspwebapi.json new file mode 100644 index 000000000..46bbd30ca --- /dev/null +++ b/json/dotnetaspwebapi.json @@ -0,0 +1,39 @@ +{ + "name":"Dotnet ASP Web API", + "slug":"dotnetaspwebapi", + "categories":[ + 0 + ], + "date_created":"2025-01-15", + "type":"ct", + "updateable":true, + "privileged":true, + "interface_port":80, + "documentation":"https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-9.0&tabs=linux-ubuntu", + "website":"https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-9.0&tabs=linux-ubuntu", + "logo":"https://upload.wikimedia.org/wikipedia/commons/thumb/7/7d/Microsoft_.NET_logo.svg/456px-Microsoft_.NET_logo.svg.png", + "description":"Automatically setup a ASP.NET server up, as well as a FTP server so you can publish to this container from Visual Studio.", + "install_methods":[ + { + "type":"default", + "script":"ct/dotnetaspwebapi.sh", + "resources":{ + "cpu":1, + "ram":1024, + "hdd":8, + "os":"Ubuntu", + "version":"24.04" + } + } + ], + "default_credentials":{ + "username":null, + "password":null + }, + "notes":[ + { + "text":"FTP server credentials: `cat ~/ftp.creds`", + "type":"info" + } + ] +} diff --git a/json/kavita.json b/json/kavita.json index 861eb0a42..688cc36d3 100644 --- a/json/kavita.json +++ b/json/kavita.json @@ -30,6 +30,10 @@ "username": null, "password": null }, - "notes": [], + "notes": [{ + "text": "To enable folder adding append your lxc.conf on your host with 'lxc.environment: DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1'", + "type": "info" + } + ], "status": "✅" -} \ No newline at end of file +} diff --git a/json/opengist.json b/json/opengist.json new file mode 100644 index 000000000..d779ed29f --- /dev/null +++ b/json/opengist.json @@ -0,0 +1,34 @@ +{ + "name": "Opengist", + "slug": "opengist", + "categories": [ + 3 + ], + "date_created": "2025-01-14", + "type": "ct", + "updateable": false, + "privileged": false, + "interface_port": 6157, + "documentation": null, + "website": "https://opengist.io/", + "logo": "https://raw.githubusercontent.com/thomiceli/opengist/master/public/opengist.svg", + "description": "Self-hosted pastebin powered by Git, open-source alternative to Github Gist.", + "install_methods": [ + { + "type": "default", + "script": "ct/opengist.sh", + "resources": { + "cpu": 1, + "ram": 1024, + "hdd": 8, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} \ No newline at end of file diff --git a/json/phpipam.json b/json/phpipam.json new file mode 100644 index 000000000..4d7d3e508 --- /dev/null +++ b/json/phpipam.json @@ -0,0 +1,34 @@ +{ + "name": "phpIPAM", + "slug": "phpipam", + "categories": [ + 11 + ], + "date_created": "2025-01-15", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 80, + "documentation": "https://phpipam.net/documents/all-documents/", + "website": "https://phpipam.net/", + "logo": "https://phpipam.net/css/images/phpipam_logo_small@2x.png", + "description": "phpipam is an open-source web IP address management application (IPAM). Its goal is to provide light, modern and useful IP address management.", + "install_methods": [ + { + "type": "default", + "script": "ct/phpipam.sh", + "resources": { + "cpu": 1, + "ram": 1024, + "hdd": 4, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": "Admin", + "password": "ipamadmin" + }, + "notes": [] +} diff --git a/json/wordpress.json b/json/wordpress.json new file mode 100644 index 000000000..b82f0c567 --- /dev/null +++ b/json/wordpress.json @@ -0,0 +1,34 @@ +{ + "name": "Wordpress", + "slug": "wordpress", + "categories": [ + 14 + ], + "date_created": "2025-01-14", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 80, + "documentation": "https://wordpress.org/documentation/", + "website": "https://wordpress.org/", + "logo": "https://s.w.org/style/images/about/WordPress-logotype-simplified.png", + "description": "WordPress is the simplest, most popular way to create your own website or blog. In fact, WordPress powers over 43.6% of all the websites on the Internet. Yes – more than one in four websites that you visit are likely powered by WordPress.\n\nOn a slightly more technical level, WordPress is an open-source content management system licensed under GPLv2, which means that anyone can use or modify the WordPress software for free.", + "install_methods": [ + { + "type": "default", + "script": "ct/wordpress.sh", + "resources": { + "cpu": 2, + "ram": 2048, + "hdd": 5, + "os": "Debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} \ No newline at end of file diff --git a/misc/.app-headers b/misc/.app-headers index f43befdab..847a4ebfc 100644 --- a/misc/.app-headers +++ b/misc/.app-headers @@ -1,4 +1,4 @@ -### Generated on 01-10-2025 +### Generated on 01-16-2025 ################################################## ### 2fauth.sh @@ -421,6 +421,21 @@ APP=Dockge /_____/\____/\___/_/|_|\__, /\___/ /____/ +### dotnetaspwebapi.sh +APP=Dotnet ASP Web API + ____ __ __ ___ _____ ____ _ __ __ + / __ \____ / /_____ ___ / /_ / | / ___// __ \ | | / /__ / /_ + / / / / __ \/ __/ __ \/ _ \/ __/ / /| | \__ \/ /_/ / | | /| / / _ \/ __ \ + / /_/ / /_/ / /_/ / / / __/ /_ / ___ |___/ / ____/ | |/ |/ / __/ /_/ / +/_____/\____/\__/_/ /_/\___/\__/ /_/ |_/____/_/ |__/|__/\___/_.___/ + + ___ ____ ____ + / | / __ \/ _/ + / /| | / /_/ // / + / ___ |/ ____// / +/_/ |_/_/ /___/ + + ### emby.sh APP=Emby ______ __ @@ -529,6 +544,15 @@ APP=Frigate /_/ /_/ /_/\__, /\__,_/\__/\___/ /____/ +### ghost.sh +APP=Ghost + ________ __ + / ____/ /_ ____ _____/ /_ + / / __/ __ \/ __ \/ ___/ __/ +/ /_/ / / / / /_/ (__ ) /_ +\____/_/ /_/\____/____/\__/ + + ### gitea.sh APP=Gitea _______ __ @@ -1222,6 +1246,15 @@ APP=OneDev \____/_/ /_/\___/_____/\___/|___/ +### opengist.sh +APP=Opengist + ____ _ __ + / __ \____ ___ ____ ____ _(_)____/ /_ + / / / / __ \/ _ \/ __ \/ __ `/ / ___/ __/ +/ /_/ / /_/ / __/ / / / /_/ / (__ ) /_ +\____/ .___/\___/_/ /_/\__, /_/____/\__/ + /_/ /____/ + ### openhab.sh APP=openHAB __ _____ ____ @@ -1339,6 +1372,15 @@ APP=PhotoPrism /_/ /_/ /_/\____/\__/\____/_/ /_/ /_/____/_/ /_/ /_/ +### phpipam.sh +APP=phpIPAM + __ ________ ___ __ ___ + ____ / /_ ____ / _/ __ \/ | / |/ / + / __ \/ __ \/ __ \ / // /_/ / /| | / /|_/ / + / /_/ / / / / /_/ // // ____/ ___ |/ / / / + / .___/_/ /_/ .___/___/_/ /_/ |_/_/ /_/ +/_/ /_/ + ### pialert.sh APP=PiAlert ____ _ ___ __ __ @@ -1948,6 +1990,15 @@ APP=Wireguard |__/|__/_/_/ \___/\__, /\__,_/\__,_/_/ \__,_/ /____/ +### wordpress.sh +APP=Wordpress + _ __ __ +| | / /___ _________/ /___ ________ __________ +| | /| / / __ \/ ___/ __ / __ \/ ___/ _ \/ ___/ ___/ +| |/ |/ / /_/ / / / /_/ / /_/ / / / __(__ |__ ) +|__/|__/\____/_/ \__,_/ .___/_/ \___/____/____/ + /_/ + ### yunohost.sh APP=YunoHost __ __ __ __ __ diff --git a/misc/build.func b/misc/build.func index cba92e8bb..7edf23bde 100644 --- a/misc/build.func +++ b/misc/build.func @@ -35,7 +35,7 @@ color() { INFO="${TAB}💡${TAB}${CL}" OS="${TAB}🖥️${TAB}${CL}" OSVERSION="${TAB}🌟${TAB}${CL}" - CONTAINERTYPE="${TAB}📦${TAB}${CL}" + CONTAINERTYPE="${TAB}📦${TAB}${CL}" DISKSIZE="${TAB}💾${TAB}${CL}" CPUCORE="${TAB}🧠${TAB}${CL}" RAMSIZE="${TAB}🛠️${TAB}${CL}" @@ -282,8 +282,9 @@ base_settings() { MAC="" VLAN="" SSH="no" + SSH_AUTHORIZED_KEY="" TAGS="community-script;" - + # Override default settings with variables from ct script CT_TYPE=${var_unprivileged:-$CT_TYPE} DISK_SIZE=${var_disk:-$DISK_SIZE} @@ -291,7 +292,7 @@ base_settings() { RAM_SIZE=${var_ram:-$RAM_SIZE} VERB=${var_verbose:-$VERBOSE} TAGS="${TAGS}${var_tags:-}" - + # Since these 2 are only defined outside of default_settings function, we add a temporary fallback. TODO: To align everything, we should add these as constant variables (e.g. OSTYPE and OSVERSION), but that would currently require updating the default_settings function for all existing scripts if [ -z "$var_os" ]; then var_os="debian" @@ -313,9 +314,9 @@ echo_default() { echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" - echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE}GB${CL}" + echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}" echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}${CORE_COUNT}${CL}" - echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE}MiB${CL}" + echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}" echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}${CT_ID}${CL}" if [ "$VERB" == "yes" ]; then echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}Enabled${CL}" @@ -462,13 +463,13 @@ advanced_settings() { if DISK_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then if [ -z "$DISK_SIZE" ]; then DISK_SIZE="$var_disk" - echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE}GB${CL}" + echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}" else if ! [[ $DISK_SIZE =~ $INTEGER ]]; then echo -e "{INFO}${HOLD}${RD} DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" advanced_settings fi - echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE}GB${CL}" + echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}" fi else exit_script @@ -488,9 +489,9 @@ advanced_settings() { if RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then if [ -z "$RAM_SIZE" ]; then RAM_SIZE="$var_ram" - echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE}MiB${CL}" + echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}" else - echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE}MiB${CL}" + echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}" fi else exit_script @@ -627,9 +628,14 @@ advanced_settings() { if ADV_TAGS=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Custom Tags?[If you remove all, there will be no tags!]" 8 58 ${TAGS} --title "Advanced Tags" 3>&1 1>&2 2>&3); then if [ -n "${ADV_TAGS}" ]; then - ADV_TAGS=${ADV_TAGS:-""} - ADV_TAGS=$(echo "$ADV_TAGS" | tr -d '[:space:]') + ADV_TAGS=$(echo "$ADV_TAGS" | tr -d '[:space:]') # Remove whitespace from ADV_TAGS + if [[ "$ADV_TAGS" != *"community-script"* ]]; then TAGS="community-script;${ADV_TAGS}" + else + TAGS="${ADV_TAGS}" # ADV_TAGS already contains "community-script" + fi + else + TAGS="community-script;" fi echo -e "${NETWORK}${BOLD}${DGN}Tags: ${BGN}$TAGS${CL}" else @@ -648,6 +654,15 @@ advanced_settings() { echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}" fi + if [[ "${SSH}" == "yes" ]]; then + SSH_AUTHORIZED_KEY="$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "SSH Authorized key for root (leave empty for none)" 8 58 --title "SSH Key" 3>&1 1>&2 2>&3)" + + if [[ -z "${SSH_AUTHORIZED_KEY}" ]]; then + echo "Warning: No SSH key provided." + fi + else + SSH_AUTHORIZED_KEY="" + fi if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then VERB="yes" else @@ -695,15 +710,15 @@ install_script() { header_info echo -e "${DEFAULT}${BOLD}${BL}Using Default Settings on node $PVEHOST_NAME${CL}" VERB="no" - base_settings "$VERB" + base_settings "$VERB" echo_default break ;; 2) header_info - echo -e "${DEFAULT}${BOLD}${BL}Using Default Settings on node $PVEHOST_NAME (${SEARCH}${BL}Verbose)${CL}" + echo -e "${DEFAULT}${BOLD}${BL}Using Default Settings on node $PVEHOST_NAME (${SEARCH}Verbose)${CL}" VERB="yes" - base_settings "$VERB" + base_settings "$VERB" echo_default break ;; @@ -727,13 +742,13 @@ install_script() { check_container_resources() { # Check actual RAM & Cores current_ram=$(free -m | awk 'NR==2{print $2}') - current_cpu=$(nproc) + current_cpu=$(nproc) # Check whether the current RAM is less than the required RAM or the CPU cores are less than required if [[ "$current_ram" -lt "$var_ram" ]] || [[ "$current_cpu" -lt "$var_cpu" ]]; then echo -e "\n${INFO}${HOLD} ${GN}Required: ${var_cpu} CPU, ${var_ram}MB RAM ${CL}| ${RD}Current: ${current_cpu} CPU, ${current_ram}MB RAM${CL}" echo -e "${YWB}Please ensure that the ${APP} LXC is configured with at least ${var_cpu} vCPU and ${var_ram} MB RAM for the build process.${CL}\n" - read -r -p "${INFO}${HOLD} May cause data loss! ${INFO} Continue update with under-provisioned LXC? " prompt + read -r -p "${INFO}${HOLD} May cause data loss! ${INFO} Continue update with under-provisioned LXC? " prompt # Check if the input is 'yes', otherwise exit with status 1 if [[ ! ${prompt,,} =~ ^(yes)$ ]]; then echo -e "${CROSS}${HOLD} ${YWB}Exiting based on user input.${CL}" @@ -752,7 +767,7 @@ check_container_storage() { if (( usage > 80 )); then # Prompt the user for confirmation to continue echo -e "${INFO}${HOLD} ${YWB}Warning: Storage is dangerously low (${usage}%).${CL}" - read -r -p "Continue anyway? " prompt + read -r -p "Continue anyway? " prompt # Check if the input is 'y' or 'yes', otherwise exit with status 1 if [[ ! ${prompt,,} =~ ^(y|yes)$ ]]; then echo -e "${CROSS}${HOLD}${YWB}Exiting based on user input.${CL}" @@ -810,6 +825,7 @@ build_container() { export PASSWORD="$PW" export VERBOSE="$VERB" export SSH_ROOT="${SSH}" + export SSH_AUTHORIZED_KEY export CTID="$CT_ID" export CTTYPE="$CT_TYPE" export PCT_OSTYPE="$var_os" diff --git a/misc/install.func b/misc/install.func index ac6379648..df5f2629e 100644 --- a/misc/install.func +++ b/misc/install.func @@ -254,4 +254,11 @@ EOF fi echo "bash -c \"\$(wget -qLO - https://github.com/asylumexp/Proxmox/raw/main/ct/${app}.sh)\"" >/usr/bin/update chmod +x /usr/bin/update + + if [[ -n "${SSH_AUTHORIZED_KEY}" ]]; then + mkdir -p /root/.ssh + echo "${SSH_AUTHORIZED_KEY}" > /root/.ssh/authorized_keys + chmod 700 /root/.ssh + chmod 600 /root/.ssh/authorized_keys + fi }