mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-07-01 19:47:38 +00:00
Compare commits
34 Commits
2024-12-02
...
2024-12-08
Author | SHA1 | Date | |
---|---|---|---|
e4354c1d53 | |||
8a6ea7cbac | |||
96d691c862 | |||
82ee63a6db | |||
102669cd11 | |||
ae120c1e23 | |||
c056dd97ea | |||
5b2cbd3e99 | |||
cadae9796e | |||
9eb5cc022a | |||
52898b4edf | |||
e45aba86bd | |||
be4e6503d7 | |||
59deaa0a19 | |||
a4803d178d | |||
259203ee51 | |||
944328625a | |||
3d38ad0288 | |||
c46f15cdc1 | |||
e2aa5fe627 | |||
493c2c931c | |||
ce545bd499 | |||
0ba2ea9183 | |||
cff3fa8696 | |||
871fd6517d | |||
3a876c99ef | |||
5c3fe0e802 | |||
3ec3478b2d | |||
67524454d7 | |||
ec27e92833 | |||
fa20526525 | |||
4f5712097b | |||
3c388ef157 | |||
df99c30ab3 |
79
.github/workflows/deploy-pages.yml
vendored
79
.github/workflows/deploy-pages.yml
vendored
@ -1,79 +0,0 @@
|
||||
# Sample workflow for building and deploying a Next.js site to GitHub Pages
|
||||
#
|
||||
# To get started with Next.js see: https://nextjs.org/docs/getting-started
|
||||
#
|
||||
name: Deploy Next.js site to Pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
paths:
|
||||
- frontend/**
|
||||
- json/**
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
concurrency:
|
||||
group: "pages"
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: frontend # Set default working directory for all run steps
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Detect package manager
|
||||
id: detect-package-manager
|
||||
run: |
|
||||
if [ -f "${{ github.workspace }}/frontend/yarn.lock" ]; then
|
||||
echo "manager=yarn" >> $GITHUB_OUTPUT
|
||||
echo "command=install" >> $GITHUB_OUTPUT
|
||||
echo "runner=yarn" >> $GITHUB_OUTPUT
|
||||
exit 0
|
||||
elif [ -f "${{ github.workspace }}/frontend/package.json" ]; then
|
||||
echo "manager=npm" >> $GITHUB_OUTPUT
|
||||
echo "command=ci" >> $GITHUB_OUTPUT
|
||||
echo "runner=npx --no-install" >> $GITHUB_OUTPUT
|
||||
exit 0
|
||||
else
|
||||
echo "Unable to determine package manager"
|
||||
exit 1
|
||||
fi
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "20"
|
||||
cache: ${{ steps.detect-package-manager.outputs.manager }}
|
||||
cache-dependency-path: frontend/package-lock.json # Specify the path to package-lock.json
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v5
|
||||
with:
|
||||
static_site_generator: next
|
||||
- name: Install dependencies
|
||||
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }} --legacy-peer-deps
|
||||
- name: Build with Next.js
|
||||
run: ${{ steps.detect-package-manager.outputs.runner }} next build
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: frontend/out
|
||||
|
||||
deploy:
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
78
.github/workflows/frontend-cicd.yml
vendored
Normal file
78
.github/workflows/frontend-cicd.yml
vendored
Normal file
@ -0,0 +1,78 @@
|
||||
# Based on https://github.com/actions/starter-workflows/blob/main/pages/nextjs.yml
|
||||
|
||||
name: Frontend CI/CD
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
paths:
|
||||
- frontend/**
|
||||
- json/**
|
||||
|
||||
pull_request:
|
||||
branches: ["main"]
|
||||
types: [opened, synchronize, reopened, edited]
|
||||
paths:
|
||||
- frontend/**
|
||||
- json/**
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: pages-${{ github.ref }}
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: frontend # Set default working directory for all run steps
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "20"
|
||||
cache: npm
|
||||
cache-dependency-path: frontend/package-lock.json
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci --prefer-offline --legacy-peer-deps
|
||||
|
||||
- name: Run tests
|
||||
run: npm run test
|
||||
|
||||
- name: Configure Next.js for pages
|
||||
uses: actions/configure-pages@v5
|
||||
with:
|
||||
static_site_generator: next
|
||||
|
||||
- name: Build with Next.js
|
||||
run: npm run build
|
||||
|
||||
- name: Upload artifact
|
||||
if: github.ref == 'refs/heads/main'
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: frontend/out
|
||||
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
if: github.ref == 'refs/heads/main'
|
||||
permissions:
|
||||
pages: write
|
||||
id-token: write
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
80
CHANGELOG.md
80
CHANGELOG.md
@ -16,6 +16,86 @@ 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
|
||||
|
||||
## 2024-12-08
|
||||
|
||||
### Changed
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- Use MongoDB 4.4 in Unifi for non-AVX users [@havardthom](https://github.com/havardthom) ([#691](https://github.com/community-scripts/ProxmoxVE/pull/691))
|
||||
|
||||
### 🌐 Website
|
||||
|
||||
- Move homarr to Dashboards section [@CrazyWolf13](https://github.com/CrazyWolf13) ([#740](https://github.com/community-scripts/ProxmoxVE/pull/740))
|
||||
|
||||
## 2024-12-07
|
||||
|
||||
### Changed
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- Zigbee2MQTT: Remove dev branch choice until v2.0.0 release [@havardthom](https://github.com/havardthom) ([#702](https://github.com/community-scripts/ProxmoxVE/pull/702))
|
||||
- Fix Hoarder build failure by installing Chromium stable [@vhsdream](https://github.com/vhsdream) ([#723](https://github.com/community-scripts/ProxmoxVE/pull/723))
|
||||
|
||||
### 🌐 Website
|
||||
|
||||
- Bugfix: Include script name in website search [@havardthom](https://github.com/havardthom) ([#731](https://github.com/community-scripts/ProxmoxVE/pull/731))
|
||||
|
||||
### ❔ Unlabelled
|
||||
|
||||
- Fix broken build.func [@havardthom](https://github.com/havardthom) ([#736](https://github.com/community-scripts/ProxmoxVE/pull/736))
|
||||
|
||||
## 2024-12-06
|
||||
|
||||
### Changed
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- Fix bugs in Komga update [@DysfunctionalProgramming](https://github.com/DysfunctionalProgramming) ([#717](https://github.com/community-scripts/ProxmoxVE/pull/717))
|
||||
- Bookstack: Fix Update function composer [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#700](https://github.com/community-scripts/ProxmoxVE/pull/700))
|
||||
|
||||
### 🌐 Website
|
||||
|
||||
- fix: note component in json-editor getting out of focus when typing and revert theme switch animation [@BramSuurdje](https://github.com/BramSuurdje) ([#706](https://github.com/community-scripts/ProxmoxVE/pull/706))
|
||||
|
||||
### 🧰 Maintenance
|
||||
|
||||
- Update frontend CI/CD workflow [@havardthom](https://github.com/havardthom) ([#703](https://github.com/community-scripts/ProxmoxVE/pull/703))
|
||||
|
||||
## 2024-12-05
|
||||
|
||||
### Changed
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- PostgreSQL: Change authentication method from peer to md5 for UNIX sockets [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#650](https://github.com/community-scripts/ProxmoxVE/pull/650))
|
||||
- Fix stdout in unifi.sh [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#688](https://github.com/community-scripts/ProxmoxVE/pull/688))
|
||||
- Fix `rm` bug in Vikunja update [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#692](https://github.com/community-scripts/ProxmoxVE/pull/692))
|
||||
|
||||
## 2024-12-04
|
||||
|
||||
### Changed
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- Update Spelling 'Environment' in nginxproxymanager [@MathijsG](https://github.com/MathijsG) ([#676](https://github.com/community-scripts/ProxmoxVE/pull/676))
|
||||
|
||||
### 🌐 Website
|
||||
|
||||
- Update homepage.json documentation and website links [@patchmonkey](https://github.com/patchmonkey) ([#668](https://github.com/community-scripts/ProxmoxVE/pull/668))
|
||||
|
||||
## 2024-12-03
|
||||
|
||||
### Changed
|
||||
|
||||
### ✨ New Scripts
|
||||
|
||||
- New Script: Onedev [@quantumryuu](https://github.com/quantumryuu) ([#612](https://github.com/community-scripts/ProxmoxVE/pull/612))
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- Script Update: SnipeIT [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#641](https://github.com/community-scripts/ProxmoxVE/pull/641))
|
||||
|
||||
## 2024-12-02
|
||||
|
||||
### Changed
|
||||
|
@ -70,9 +70,10 @@ if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_v
|
||||
unzip -q v${RELEASE}.zip
|
||||
mv BookStack-${RELEASE} /opt/bookstack
|
||||
mv /opt/.env /opt/bookstack/.env
|
||||
cd /opt/bookstack
|
||||
COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev &>/dev/null
|
||||
php artisan key:generate &>/dev/null
|
||||
php artisan migrate &>/dev/null
|
||||
php artisan key:generate --force &>/dev/null
|
||||
php artisan migrate --force &>/dev/null
|
||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||
msg_ok "Updated ${APP}"
|
||||
|
||||
|
@ -56,7 +56,7 @@ function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -f /opt/komga/komga*.jar ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
||||
if [[ ! -f /opt/komga/komga.jar ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
||||
msg_info "Updating ${APP}"
|
||||
RELEASE=$(curl -s https://api.github.com/repos/gotson/komga/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
||||
@ -65,8 +65,8 @@ if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_v
|
||||
msg_ok "Stopped ${APP}"
|
||||
|
||||
msg_info "Updating ${APP} to ${RELEASE}"
|
||||
rm -rf /opt/komga/komga*.jar
|
||||
wget -q "https://github.com/gotson/komga/releases/download/v${RELEASE}/komga-${RELEASE}.jar"
|
||||
wget -q "https://github.com/gotson/komga/releases/download/${RELEASE}/komga-${RELEASE}.jar"
|
||||
rm -rf /opt/komga/komga.jar
|
||||
mv -f komga-${RELEASE}.jar /opt/komga/komga.jar
|
||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||
msg_ok "Updated ${APP} to ${RELEASE}"
|
||||
|
99
ct/onedev.sh
Normal file
99
ct/onedev.sh
Normal file
@ -0,0 +1,99 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
# Copyright (c) 2021-2024 community-scripts ORG
|
||||
# Author: kristocopani
|
||||
# License: MIT
|
||||
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
|
||||
function header_info {
|
||||
clear
|
||||
cat <<"EOF"
|
||||
____ ____
|
||||
/ __ \____ ___ / __ \___ _ __
|
||||
/ / / / __ \/ _ \/ / / / _ \ | / /
|
||||
/ /_/ / / / / __/ /_/ / __/ |/ /
|
||||
\____/_/ /_/\___/_____/\___/|___/
|
||||
|
||||
EOF
|
||||
}
|
||||
header_info
|
||||
echo -e "Loading..."
|
||||
APP="OneDev"
|
||||
var_disk="4"
|
||||
var_cpu="2"
|
||||
var_ram="2048"
|
||||
var_os="debian"
|
||||
var_version="12"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function default_settings() {
|
||||
CT_TYPE="1"
|
||||
PW=""
|
||||
CT_ID=$NEXTID
|
||||
HN=$NSAPP
|
||||
DISK_SIZE="$var_disk"
|
||||
CORE_COUNT="$var_cpu"
|
||||
RAM_SIZE="$var_ram"
|
||||
BRG="vmbr0"
|
||||
NET="dhcp"
|
||||
GATE=""
|
||||
APT_CACHER=""
|
||||
APT_CACHER_IP=""
|
||||
DISABLEIP6="no"
|
||||
MTU=""
|
||||
SD=""
|
||||
NS=""
|
||||
MAC=""
|
||||
VLAN=""
|
||||
SSH="no"
|
||||
VERB="no"
|
||||
echo_default
|
||||
}
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -f /etc/systemd/system/onedev.service ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
GITHUB_RELEASE=$(curl -s https://api.github.com/repos/theonedev/onedev/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${GITHUB_RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop onedev
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
msg_info "Updating ${APP} to v${GITHUB_RELEASE}"
|
||||
cd /opt
|
||||
wget -q https://code.onedev.io/onedev/server/~site/onedev-latest.tar.gz
|
||||
tar -xzf onedev-latest.tar.gz
|
||||
/opt/onedev-latest/bin/upgrade.sh /opt/onedev >/dev/null
|
||||
RELEASE=$(cat /opt/onedev/release.properties | grep "version" | cut -d'=' -f2)
|
||||
echo "${RELEASE}" >"/opt/${APP}_version.txt"
|
||||
msg_ok "Updated ${APP} to v${RELEASE}"
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start onedev
|
||||
msg_ok "Started Service"
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -rf /opt/onedev-latest
|
||||
rm -rf /opt/onedev-latest.tar.gz
|
||||
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 "${APP} should be reachable by going to the following URL.
|
||||
${BL}http://${IP}:6610${CL} \n"
|
@ -58,32 +58,36 @@ header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -d /opt/snipe-it ]]; 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
|
||||
mv /opt/snipe-it /opt/snipe-it-backup
|
||||
cd /opt
|
||||
RELEASE=$(curl -s https://api.github.com/repos/snipe/snipe-it/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
wget -q "https://github.com/snipe/snipe-it/archive/refs/tags/v${RELEASE}.zip" &>/dev/null
|
||||
unzip -q v${RELEASE}.zip
|
||||
mv snipe-it-${RELEASE} /opt/snipe-it
|
||||
cp /opt/snipe-it-backup/.env /opt/snipe-it/.env
|
||||
cp -r /opt/snipe-it-backup/public/uploads/ /opt/snipe-it/public/uploads/
|
||||
cp -r /opt/snipe-it-backup/storage/private_uploads /opt/snipe-it/storage/private_uploads
|
||||
cd /opt/snipe-it/
|
||||
export COMPOSER_ALLOW_SUPERUSER=1
|
||||
composer install --no-dev --prefer-source &>/dev/null
|
||||
composer dump-autoload &>/dev/null
|
||||
php artisan migrate --force &>/dev/null
|
||||
php artisan config:clear &>/dev/null
|
||||
php artisan route:clear &>/dev/null
|
||||
php artisan cache:clear &>/dev/null
|
||||
php artisan view:clear &>/dev/null
|
||||
chown -R www-data: /opt/snipe-it
|
||||
chmod -R 755 /opt/snipe-it
|
||||
rm -rf /opt/v${RELEASE}.zip
|
||||
rm -rf /opt/snipe-it-backup
|
||||
msg_ok "Updated ${APP} LXC"
|
||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
||||
msg_info "Updating ${APP} to v${RELEASE}"
|
||||
apt-get update &>/dev/null
|
||||
apt-get -y upgrade &>/dev/null
|
||||
mv /opt/snipe-it /opt/snipe-it-backup
|
||||
cd /opt
|
||||
wget -q "https://github.com/snipe/snipe-it/archive/refs/tags/v${RELEASE}.zip" &>/dev/null
|
||||
unzip -q v${RELEASE}.zip
|
||||
mv snipe-it-${RELEASE} /opt/snipe-it
|
||||
cp /opt/snipe-it-backup/.env /opt/snipe-it/.env
|
||||
cp -r /opt/snipe-it-backup/public/uploads/ /opt/snipe-it/public/uploads/
|
||||
cp -r /opt/snipe-it-backup/storage/private_uploads /opt/snipe-it/storage/private_uploads
|
||||
cd /opt/snipe-it/
|
||||
export COMPOSER_ALLOW_SUPERUSER=1
|
||||
composer install --no-dev --prefer-source &>/dev/null
|
||||
composer dump-autoload &>/dev/null
|
||||
php artisan migrate --force &>/dev/null
|
||||
php artisan config:clear &>/dev/null
|
||||
php artisan route:clear &>/dev/null
|
||||
php artisan cache:clear &>/dev/null
|
||||
php artisan view:clear &>/dev/null
|
||||
chown -R www-data: /opt/snipe-it
|
||||
chmod -R 755 /opt/snipe-it
|
||||
rm -rf /opt/v${RELEASE}.zip
|
||||
rm -rf /opt/snipe-it-backup
|
||||
msg_ok "Updated ${APP} LXC"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at v${RELEASE}."
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
|
@ -58,8 +58,8 @@ check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -d /usr/lib/unifi ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
||||
msg_info "Updating ${APP}"
|
||||
apt-get update --allow-releaseinfo-change
|
||||
apt-get install -y unifi
|
||||
apt-get update --allow-releaseinfo-change &>/dev/null
|
||||
apt-get install -y unifi &>/dev/null
|
||||
msg_ok "Updated Successfully"
|
||||
exit
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_v
|
||||
|
||||
msg_info "Updating ${APP} to ${RELEASE}"
|
||||
cd /opt
|
||||
rm -rf /opt/*
|
||||
rm -rf /opt/vikunja/vikunja
|
||||
wget -q "https://dl.vikunja.io/vikunja/$RELEASE/vikunja-$RELEASE-amd64.deb"
|
||||
DEBIAN_FRONTEND=noninteractive dpkg -i vikunja-$RELEASE-amd64.deb &>/dev/null
|
||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||
|
@ -12,7 +12,7 @@ import { cn } from "@/lib/utils";
|
||||
import { PlusCircle, Trash2 } from "lucide-react";
|
||||
import { z } from "zod";
|
||||
import { ScriptSchema, type Script } from "../_schemas/schemas";
|
||||
import { memo, useCallback } from "react";
|
||||
import { memo, useCallback, useRef } from "react";
|
||||
|
||||
type NoteProps = {
|
||||
script: Script;
|
||||
@ -27,6 +27,8 @@ function Note({
|
||||
setIsValid,
|
||||
setZodErrors,
|
||||
}: NoteProps) {
|
||||
const inputRefs = useRef<(HTMLInputElement | null)[]>([]);
|
||||
|
||||
const addNote = useCallback(() => {
|
||||
setScript({
|
||||
...script,
|
||||
@ -49,6 +51,12 @@ function Note({
|
||||
setIsValid(result.success);
|
||||
setZodErrors(result.success ? null : result.error);
|
||||
setScript(updated);
|
||||
// Restore focus after state update
|
||||
if (key === "text") {
|
||||
setTimeout(() => {
|
||||
inputRefs.current[index]?.focus();
|
||||
}, 0);
|
||||
}
|
||||
}, [script, setScript, setIsValid, setZodErrors]);
|
||||
|
||||
const removeNote = useCallback((index: number) => {
|
||||
@ -58,46 +66,51 @@ function Note({
|
||||
});
|
||||
}, [script, setScript]);
|
||||
|
||||
const NoteItem = memo(({ note, index }: { note: Script["notes"][number], index: number }) => (
|
||||
<div className="space-y-2 border p-4 rounded">
|
||||
<Input
|
||||
placeholder="Note Text"
|
||||
value={note.text}
|
||||
onChange={(e) => updateNote(index, "text", e.target.value)}
|
||||
/>
|
||||
<Select
|
||||
value={note.type}
|
||||
onValueChange={(value) => updateNote(index, "type", value)}
|
||||
>
|
||||
<SelectTrigger className="flex-1">
|
||||
<SelectValue placeholder="Type" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{Object.keys(AlertColors).map((type) => (
|
||||
<SelectItem key={type} value={type}>
|
||||
<span className="flex items-center gap-2">
|
||||
{type.charAt(0).toUpperCase() + type.slice(1)}{" "}
|
||||
<div
|
||||
className={cn(
|
||||
"size-4 rounded-full border",
|
||||
AlertColors[type as keyof typeof AlertColors],
|
||||
)}
|
||||
/>
|
||||
</span>
|
||||
</SelectItem>
|
||||
))}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
<Button
|
||||
size="sm"
|
||||
variant="destructive"
|
||||
type="button"
|
||||
onClick={() => removeNote(index)}
|
||||
>
|
||||
<Trash2 className="mr-2 h-4 w-4" /> Remove Note
|
||||
</Button>
|
||||
</div>
|
||||
));
|
||||
const NoteItem = memo(
|
||||
({ note, index }: { note: Script["notes"][number]; index: number }) => (
|
||||
<div className="space-y-2 border p-4 rounded">
|
||||
<Input
|
||||
placeholder="Note Text"
|
||||
value={note.text}
|
||||
onChange={(e) => updateNote(index, "text", e.target.value)}
|
||||
ref={(el) => {
|
||||
inputRefs.current[index] = el;
|
||||
}}
|
||||
/>
|
||||
<Select
|
||||
value={note.type}
|
||||
onValueChange={(value) => updateNote(index, "type", value)}
|
||||
>
|
||||
<SelectTrigger className="flex-1">
|
||||
<SelectValue placeholder="Type" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{Object.keys(AlertColors).map((type) => (
|
||||
<SelectItem key={type} value={type}>
|
||||
<span className="flex items-center gap-2">
|
||||
{type.charAt(0).toUpperCase() + type.slice(1)}{" "}
|
||||
<div
|
||||
className={cn(
|
||||
"size-4 rounded-full border",
|
||||
AlertColors[type as keyof typeof AlertColors],
|
||||
)}
|
||||
/>
|
||||
</span>
|
||||
</SelectItem>
|
||||
))}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
<Button
|
||||
size="sm"
|
||||
variant="destructive"
|
||||
type="button"
|
||||
onClick={() => removeNote(index)}
|
||||
>
|
||||
<Trash2 className="mr-2 h-4 w-4" /> Remove Note
|
||||
</Button>
|
||||
</div>
|
||||
),
|
||||
);
|
||||
|
||||
NoteItem.displayName = 'NoteItem';
|
||||
|
||||
|
@ -95,7 +95,7 @@ export default function CommandMenu() {
|
||||
{category.scripts.map((script) => (
|
||||
<CommandItem
|
||||
key={`script:${script.slug}`}
|
||||
value={script.slug}
|
||||
value={`${script.slug}-${script.name}`}
|
||||
onSelect={() => {
|
||||
setOpen(false);
|
||||
router.push(`/scripts?id=${script.slug}`);
|
||||
|
@ -30,24 +30,6 @@
|
||||
--chart-3: 197 37% 24%;
|
||||
--chart-4: 43 74% 66%;
|
||||
--chart-5: 27 87% 67%;
|
||||
--expo-out: linear(
|
||||
0 0%,
|
||||
0.1684 2.66%,
|
||||
0.3165 5.49%,
|
||||
0.446 8.52%,
|
||||
0.5581 11.78%,
|
||||
0.6535 15.29%,
|
||||
0.7341 19.11%,
|
||||
0.8011 23.3%,
|
||||
0.8557 27.93%,
|
||||
0.8962 32.68%,
|
||||
0.9283 38.01%,
|
||||
0.9529 44.08%,
|
||||
0.9711 51.14%,
|
||||
0.9833 59.06%,
|
||||
0.9915 68.74%,
|
||||
1 100%
|
||||
);
|
||||
}
|
||||
|
||||
::selection {
|
||||
@ -81,42 +63,6 @@
|
||||
--chart-4: 280 65% 60%;
|
||||
--chart-5: 340 75% 55%;
|
||||
}
|
||||
|
||||
::view-transition-group(root) {
|
||||
animation-duration: 0.7bun s;
|
||||
animation-timing-function: var(--expo-out);
|
||||
}
|
||||
|
||||
::view-transition-new(root) {
|
||||
animation-name: reveal-light;
|
||||
}
|
||||
|
||||
::view-transition-old(root),
|
||||
.dark::view-transition-old(root) {
|
||||
animation: none;
|
||||
z-index: -1;
|
||||
}
|
||||
.dark::view-transition-new(root) {
|
||||
animation-name: reveal-dark;
|
||||
}
|
||||
|
||||
@keyframes reveal-dark {
|
||||
from {
|
||||
clip-path: polygon(50% -71%, -50% 71%, -50% 71%, 50% -71%);
|
||||
}
|
||||
to {
|
||||
clip-path: polygon(50% -71%, -50% 71%, 50% 171%, 171% 50%);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes reveal-light {
|
||||
from {
|
||||
clip-path: polygon(171% 50%, 50% 171%, 50% 171%, 171% 50%);
|
||||
}
|
||||
to {
|
||||
clip-path: polygon(171% 50%, 50% 171%, -50% 71%, 50% -71%);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@layer base {
|
||||
|
@ -22,7 +22,8 @@ $STD apt-get install -y \
|
||||
sudo \
|
||||
gnupg \
|
||||
ca-certificates \
|
||||
chromium \
|
||||
chromium/stable \
|
||||
chromium-common/stable \
|
||||
mc
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
|
@ -80,7 +80,7 @@ else
|
||||
cd ./nginx-proxy-manager-${RELEASE}
|
||||
msg_ok "Downloaded Nginx Proxy Manager v${RELEASE}"
|
||||
fi
|
||||
msg_info "Setting up Enviroment"
|
||||
msg_info "Setting up Environment"
|
||||
ln -sf /usr/bin/python3 /usr/bin/python
|
||||
ln -sf /usr/bin/certbot /opt/certbot/bin/certbot
|
||||
ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx
|
||||
|
44
install/onedev-install.sh
Normal file
44
install/onedev-install.sh
Normal file
@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2024 community-scripts ORG
|
||||
# Author: kristocopani
|
||||
# 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 \
|
||||
mc \
|
||||
sudo \
|
||||
default-jdk \
|
||||
git
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
|
||||
msg_info "Installing OneDev"
|
||||
cd /opt
|
||||
wget -q https://code.onedev.io/onedev/server/~site/onedev-latest.tar.gz
|
||||
tar -xzf onedev-latest.tar.gz
|
||||
mv /opt/onedev-latest /opt/onedev
|
||||
$STD /opt/onedev/bin/server.sh install
|
||||
systemctl start onedev
|
||||
RELEASE=$(cat /opt/onedev/release.properties | grep "version" | cut -d'=' -f2)
|
||||
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
|
||||
msg_ok "Installed OneDev"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -rf /opt/onedev-latest.tar.gz
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
@ -35,7 +35,7 @@ cat <<EOF >/etc/postgresql/17/main/pg_hba.conf
|
||||
local all postgres peer
|
||||
# TYPE DATABASE USER ADDRESS METHOD
|
||||
# "local" is for Unix domain socket connections only
|
||||
local all all peer
|
||||
local all all md5
|
||||
# IPv4 local connections:
|
||||
host all all 127.0.0.1/32 scram-sha-256
|
||||
host all all 0.0.0.0/24 md5
|
||||
|
@ -45,6 +45,7 @@ msg_ok "Set up database"
|
||||
msg_info "Installing Snipe-IT"
|
||||
cd /opt
|
||||
RELEASE=$(curl -s https://api.github.com/repos/snipe/snipe-it/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
|
||||
wget -q "https://github.com/snipe/snipe-it/archive/refs/tags/v${RELEASE}.zip"
|
||||
unzip -q v${RELEASE}.zip
|
||||
mv snipe-it-${RELEASE} /opt/snipe-it
|
||||
|
@ -30,16 +30,15 @@ msg_ok "Installed Eclipse Temurin JRE"
|
||||
|
||||
if ! grep -q -m1 'avx[^ ]*' /proc/cpuinfo; then
|
||||
msg_ok "No AVX Support Detected"
|
||||
msg_info "Installing MongoDB 4.2"
|
||||
msg_info "Installing MongoDB 4.4"
|
||||
if ! dpkg -l | grep -q "libssl1.1"; then
|
||||
wget -q http://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.1_1.1.1n-0+deb10u6_amd64.deb
|
||||
$STD dpkg -i libssl1.1_1.1.1n-0+deb10u6_amd64.deb
|
||||
$STD apt-get install -f -y # Fix any broken dependencies
|
||||
fi
|
||||
wget -qO- https://www.mongodb.org/static/pgp/server-4.2.asc | gpg --dearmor > /usr/share/keyrings/mongodb-server-4.2.gpg
|
||||
echo "deb [signed-by=/usr/share/keyrings/mongodb-server-4.2.gpg] https://repo.mongodb.org/apt/debian buster/mongodb-org/4.2 main" >/etc/apt/sources.list.d/mongodb-org-4.2.list
|
||||
wget -qO- https://www.mongodb.org/static/pgp/server-4.4.asc | gpg --dearmor > /usr/share/keyrings/mongodb-server-4.4.gpg
|
||||
echo "deb [signed-by=/usr/share/keyrings/mongodb-server-4.4.gpg] https://repo.mongodb.org/apt/debian buster/mongodb-org/4.4 main" >/etc/apt/sources.list.d/mongodb-org-4.4.list
|
||||
$STD apt-get update
|
||||
$STD apt-get install -y mongodb-org=4.2.17
|
||||
$STD apt-get install -y mongodb-org
|
||||
else
|
||||
msg_info "Installing MongoDB 7.0"
|
||||
wget -qO- https://www.mongodb.org/static/pgp/server-7.0.asc | gpg --dearmor >/usr/share/keyrings/mongodb-server-7.0.gpg
|
||||
|
@ -40,20 +40,8 @@ msg_info "Setting up Zigbee2MQTT Repository"
|
||||
$STD git clone --depth 1 https://github.com/Koenkk/zigbee2mqtt.git /opt/zigbee2mqtt
|
||||
msg_ok "Set up Zigbee2MQTT Repository"
|
||||
|
||||
read -r -p "Switch to Edge/dev branch? (y/N) " prompt
|
||||
if [[ $prompt == "y" ]]; then
|
||||
DEV="y"
|
||||
else
|
||||
DEV="n"
|
||||
fi
|
||||
|
||||
msg_info "Installing Zigbee2MQTT"
|
||||
cd /opt/zigbee2mqtt
|
||||
if [[ $DEV == "y" ]]; then
|
||||
$STD git fetch origin dev:dev
|
||||
$STD git checkout dev
|
||||
$STD git pull
|
||||
fi
|
||||
$STD npm ci
|
||||
msg_ok "Installed Zigbee2MQTT"
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
"name": "Homarr",
|
||||
"slug": "homarr",
|
||||
"categories": [
|
||||
18
|
||||
15
|
||||
],
|
||||
"date_created": "2024-05-02",
|
||||
"type": "ct",
|
||||
|
@ -9,8 +9,8 @@
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 3000,
|
||||
"documentation": "https://gethomepage.dev/latest/configs/",
|
||||
"website": "https://github.com/benphelps/homepage",
|
||||
"documentation": "https://gethomepage.dev/configs/",
|
||||
"website": "https://gethomepage.dev",
|
||||
"logo": "https://avatars.githubusercontent.com/u/122929872?v=4",
|
||||
"description": "Homepage is a self-hosted dashboard solution for centralizing and organizing data and information.",
|
||||
"install_methods": [
|
||||
@ -36,4 +36,4 @@
|
||||
"type": "warning"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
34
json/onedev.json
Normal file
34
json/onedev.json
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
"name": "OneDev",
|
||||
"slug": "onedev",
|
||||
"categories": [
|
||||
3
|
||||
],
|
||||
"date_created": "2024-11-30",
|
||||
"type": "ct",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 6610,
|
||||
"documentation": "https://docs.onedev.io/",
|
||||
"website": "https://onedev.io/",
|
||||
"logo": "https://docs.onedev.io/img/logo.svg",
|
||||
"description": "Git server with CI/CD, kanban, and packages.",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "ct/onedev.sh",
|
||||
"resources": {
|
||||
"cpu": 2,
|
||||
"ram": 2048,
|
||||
"hdd": 4,
|
||||
"os": "Debian",
|
||||
"version": "12"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"notes": []
|
||||
}
|
@ -8,7 +8,7 @@
|
||||
"type": "ct",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 3000,
|
||||
"interface_port": 80,
|
||||
"documentation": "https://snipe-it.readme.io/docs/overview",
|
||||
"website": "https://snipeitapp.com/",
|
||||
"logo": "https://raw.githubusercontent.com/snipe/snipe-it/refs/heads/master/public/img/snipe-logo-bug.png",
|
||||
|
@ -32,7 +32,7 @@
|
||||
},
|
||||
"notes": [
|
||||
{
|
||||
"text": "For non-AVX CPUs, MongoDB 4.2 is installed. Please note this is a legacy solution that may present security risks and could become unsupported in future updates.",
|
||||
"text": "For non-AVX CPUs, MongoDB 4.4 is installed. Please note this is a legacy solution that may present security risks and could become unsupported in future updates.",
|
||||
"type": "warning"
|
||||
}
|
||||
]
|
||||
|
@ -504,7 +504,7 @@ install_script() {
|
||||
|
||||
check_container_resources() {
|
||||
# Check actual RAM & Cores
|
||||
current_ram=$(free -m | awk '/^Mem:/{print $2}')
|
||||
current_ram=$(free -m | awk 'NR==2{print $2}')
|
||||
current_cpu=$(nproc)
|
||||
|
||||
# Check whether the current RAM is less than the required RAM or the CPU cores are less than required
|
||||
|
Reference in New Issue
Block a user