Merge branch 'main' of https://github.com/community-scripts/ProxmoxVED
This commit is contained in:
commit
d828c37f8c
@ -1,55 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: Slaviša Arežina (tremor021)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/rclone/rclone
|
||||
|
||||
APP="Alpine-rclone"
|
||||
var_tags="${var_tags:-alpine;backup}"
|
||||
var_cpu="${var_cpu:-1}"
|
||||
var_ram="${var_ram:-256}"
|
||||
var_disk="${var_disk:-1}"
|
||||
var_os="${var_os:-alpine}"
|
||||
var_version="${var_version:-3.21}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [ ! -d /opt/rclone ]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
RELEASE=$(curl -s https://api.github.com/repos/rclone/rclone/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
if [ "${RELEASE}" != "$(cat /opt/rclone_version.txt)" ] || [ ! -f /opt/rclone_version.txt ]; then
|
||||
msg_info "Updating ${APP} LXC"
|
||||
temp_file=$(mktemp)
|
||||
curl -fsSL "https://github.com/rclone/rclone/releases/download/v${RELEASE}/rclone-v${RELEASE}-linux-amd64.zip" -o "$temp_file"
|
||||
$STD unzip -o "$temp_file" '*/**' -d /opt/rclone
|
||||
rm -f "$temp_file"
|
||||
echo "${RELEASE}" >/opt/rclone_version.txt
|
||||
msg_ok "Updated Successfully"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
||||
fi
|
||||
|
||||
exit 0
|
||||
}
|
||||
|
||||
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}http://${IP}:3000${CL}"
|
@ -1,70 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: Slaviša Arežina (tremor021)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/steveiliop56/tinyauth
|
||||
|
||||
APP="Alpine-tinyauth"
|
||||
var_tags="${var_tags:-alpine;auth}"
|
||||
var_cpu="${var_cpu:-1}"
|
||||
var_ram="${var_ram:-512}"
|
||||
var_disk="${var_disk:-3}"
|
||||
var_os="${var_os:-alpine}"
|
||||
var_version="${var_version:-3.21}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
if [[ ! -d /opt/tinyauth ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
msg_info "Updating Alpine Packages"
|
||||
$STD apk update
|
||||
$STD apk upgrade
|
||||
msg_ok "Updated Alpine Packages"
|
||||
|
||||
msg_info "Updating tinyauth"
|
||||
RELEASE=$(curl -s https://api.github.com/repos/steveiliop56/tinyauth/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
if [ "${RELEASE}" != "$(cat /opt/tinyauth_version.txt)" ] || [ ! -f /opt/tinyauth_version.txt ]; then
|
||||
$STD service tinyauth stop
|
||||
temp_file=$(mktemp)
|
||||
cp /opt/tinyauth/.env /opt
|
||||
rm -rf /opt/tinyauth
|
||||
mkdir -p /opt/tinyauth
|
||||
curl -fsSL "https://github.com/steveiliop56/tinyauth/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file"
|
||||
tar -xzf "$temp_file" -C /opt/tinyauth --strip-components=1
|
||||
cd /opt/tinyauth/frontend
|
||||
$STD bun install
|
||||
$STD bun run build
|
||||
mv dist /opt/tinyauth/internal/assets/
|
||||
cd /opt/tinyauth
|
||||
$STD go mod download
|
||||
CGO_ENABLED=0 go build -ldflags "-s -w"
|
||||
cp /opt/.env /opt/tinyauth
|
||||
echo "${RELEASE}" >/opt/tinyauth_version.txt
|
||||
rm -f "$temp_file"
|
||||
msg_info "Restarting tinyauth"
|
||||
$STD service tinyauth start
|
||||
msg_ok "Restarted tinyauth"
|
||||
msg_ok "Updated tinyauth"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
||||
fi
|
||||
exit 0
|
||||
}
|
||||
|
||||
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}:3000${CL}"
|
@ -1,72 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||
# Source: https://github.com/fuma-nama/fumadoc
|
||||
|
||||
APP="Fumadocs"
|
||||
var_tags="${var_tags:-documentation}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-2048}"
|
||||
var_disk="${var_disk:-5}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-12}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -d /opt/fumadocs ]]; then
|
||||
msg_error "No installation found in /opt/fumadocs!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ! -f /opt/fumadocs/.projectname ]]; then
|
||||
msg_error "Project name file not found: /opt/fumadocs/.projectname!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
NODE_VERSION="22" NODE_MODULE="pnpm@latest" install_node_and_modules
|
||||
PROJECT_NAME=$(</opt/fumadocs/.projectname)
|
||||
PROJECT_DIR="/opt/fumadocs/${PROJECT_NAME}"
|
||||
SERVICE_NAME="fumadocs_${PROJECT_NAME}.service"
|
||||
|
||||
if [[ ! -d "$PROJECT_DIR" ]]; then
|
||||
msg_error "Project directory does not exist: $PROJECT_DIR"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
msg_info "Stopping service $SERVICE_NAME"
|
||||
systemctl stop "$SERVICE_NAME"
|
||||
msg_ok "Stopped service $SERVICE_NAME"
|
||||
|
||||
msg_info "Updating dependencies using pnpm"
|
||||
cd "$PROJECT_DIR"
|
||||
$STD pnpm up --latest
|
||||
$STD pnpm build
|
||||
msg_ok "Updated dependencies using pnpm"
|
||||
|
||||
msg_info "Starting service $SERVICE_NAME"
|
||||
systemctl start "$SERVICE_NAME"
|
||||
msg_ok "Started service $SERVICE_NAME"
|
||||
|
||||
msg_ok "Fumadocs successfully updated"
|
||||
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}:3000${CL}"
|
@ -1,6 +0,0 @@
|
||||
___ __ _ __
|
||||
/ | / /___ (_)___ ___ __________/ /___ ____ ___
|
||||
/ /| | / / __ \/ / __ \/ _ \______/ ___/ ___/ / __ \/ __ \/ _ \
|
||||
/ ___ |/ / /_/ / / / / / __/_____/ / / /__/ / /_/ / / / / __/
|
||||
/_/ |_/_/ .___/_/_/ /_/\___/ /_/ \___/_/\____/_/ /_/\___/
|
||||
/_/
|
@ -1,6 +0,0 @@
|
||||
___ __ _ __ _ __ __
|
||||
/ | / /___ (_)___ ___ / /_(_)___ __ ______ ___ __/ /_/ /_
|
||||
/ /| | / / __ \/ / __ \/ _ \______/ __/ / __ \/ / / / __ `/ / / / __/ __ \
|
||||
/ ___ |/ / /_/ / / / / / __/_____/ /_/ / / / / /_/ / /_/ / /_/ / /_/ / / /
|
||||
/_/ |_/_/ .___/_/_/ /_/\___/ \__/_/_/ /_/\__, /\__,_/\__,_/\__/_/ /_/
|
||||
/_/ /____/
|
@ -1,6 +0,0 @@
|
||||
______ __
|
||||
/ ____/_ ______ ___ ____ _____/ /___ __________
|
||||
/ /_ / / / / __ `__ \/ __ `/ __ / __ \/ ___/ ___/
|
||||
/ __/ / /_/ / / / / / / /_/ / /_/ / /_/ / /__(__ )
|
||||
/_/ \__,_/_/ /_/ /_/\__,_/\__,_/\____/\___/____/
|
||||
|
@ -1,55 +0,0 @@
|
||||
{
|
||||
"name": "Alpine-rclone",
|
||||
"slug": "alpine-rclone",
|
||||
"categories": [
|
||||
11
|
||||
],
|
||||
"date_created": "2025-04-28",
|
||||
"type": "ct",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 3000,
|
||||
"documentation": "https://rclone.org/docs/",
|
||||
"website": "https://rclone.org/",
|
||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/rclone.svg",
|
||||
"config_path": "~/.config/rclone/rclone.conf",
|
||||
"description": "Rclone is a command-line program to manage files on cloud storage. It is a feature-rich alternative to cloud vendors' web storage interfaces",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "ct/alpine-rclone.sh",
|
||||
"resources": {
|
||||
"cpu": 1,
|
||||
"ram": 256,
|
||||
"hdd": 1,
|
||||
"os": "alpine",
|
||||
"version": "3.21"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "alpine",
|
||||
"script": "ct/alpine-rclone.sh",
|
||||
"resources": {
|
||||
"cpu": 1,
|
||||
"ram": 256,
|
||||
"hdd": 1,
|
||||
"os": "alpine",
|
||||
"version": "3.21"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"notes": [
|
||||
{
|
||||
"type": "info",
|
||||
"text": "`cat ~/rclone.creds` to view login credentials"
|
||||
},
|
||||
{
|
||||
"type": "info",
|
||||
"text": "`htpasswd -b -B /opt/rclone/login.pwd newuser newuserpassword` to add more users."
|
||||
}
|
||||
]
|
||||
}
|
@ -1,51 +0,0 @@
|
||||
{
|
||||
"name": "Alpine-tinyauth",
|
||||
"slug": "alpine-tinyauth",
|
||||
"categories": [
|
||||
6
|
||||
],
|
||||
"date_created": "2025-04-28",
|
||||
"type": "ct",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 3000,
|
||||
"documentation": "https://tinyauth.app/docs/getting-started.html",
|
||||
"website": "https://tinyauth.app/",
|
||||
"logo": "https://raw.githubusercontent.com/steveiliop56/tinyauth/refs/heads/main/frontend/public/android-chrome-192x192.png",
|
||||
"config_path": "/opt/tinyauth/.env",
|
||||
"description": "Tinyauth is a simple authentication middleware that adds simple username/password login or OAuth with Google, Github and any generic provider to all of your docker apps. It is designed for traefik but it can be extended to work with all reverse proxies like caddy and nginx.",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "ct/alpine-tinyauth.sh",
|
||||
"resources": {
|
||||
"cpu": 1,
|
||||
"ram": 256,
|
||||
"hdd": 3,
|
||||
"os": "alpine",
|
||||
"version": "3.21"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "alpine",
|
||||
"script": "ct/alpine-tinyauth.sh",
|
||||
"resources": {
|
||||
"cpu": 1,
|
||||
"ram": 256,
|
||||
"hdd": 3,
|
||||
"os": "alpine",
|
||||
"version": "3.21"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"notes": [
|
||||
{
|
||||
"type": "info",
|
||||
"text": "`cat ~/tinyauth.creds` to view login credentials"
|
||||
}
|
||||
]
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
{
|
||||
"name": "Fumadocs",
|
||||
"slug": "fumadocs",
|
||||
"categories": [
|
||||
10
|
||||
],
|
||||
"date_created": "2025-05-06",
|
||||
"type": "ct",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 3000,
|
||||
"documentation": "https://fumadocs.vercel.app/docs/ui",
|
||||
"website": "https://fumadocs.vercel.app/",
|
||||
"logo": "https://raw.githubusercontent.com/fuma-nama/fumadocs/refs/heads/dev/documents/logo.png",
|
||||
"config_path": "",
|
||||
"description": "Fumadocs is a flexible and high-performance framework for creating well-structured documentation websites using Next.js. It allows developers to write content and transform it into structured data. Fumadocs supports various content sources, including MDX and Content Collections, and integrates search solutions like Orama and Algolia. It also provides interactive components to enhance the user experience.",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "ct/fumadocs.sh",
|
||||
"resources": {
|
||||
"cpu": 2,
|
||||
"ram": 2048,
|
||||
"hdd": 5,
|
||||
"os": "Debian",
|
||||
"version": "12"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"notes": []
|
||||
}
|
@ -1,68 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: Slaviša Arežina (tremor021)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/rclone/rclone
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing dependencies"
|
||||
$STD apk add --no-cache \
|
||||
unzip \
|
||||
apache2-utils
|
||||
msg_ok "Installed dependencies"
|
||||
|
||||
msg_info "Installing rclone"
|
||||
temp_file=$(mktemp)
|
||||
mkdir -p /opt/rclone
|
||||
RELEASE=$(curl -s https://api.github.com/repos/rclone/rclone/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
curl -fsSL "https://github.com/rclone/rclone/releases/download/v${RELEASE}/rclone-v${RELEASE}-linux-amd64.zip" -o "$temp_file"
|
||||
$STD unzip -j "$temp_file" '*/**' -d /opt/rclone
|
||||
cd /opt/rclone
|
||||
RCLONE_PASSWORD=$(head -c 16 /dev/urandom | xxd -p -c 16)
|
||||
$STD htpasswd -cb -B login.pwd admin "$RCLONE_PASSWORD"
|
||||
{
|
||||
echo "rclone-Credentials"
|
||||
echo "rclone User Name: admin"
|
||||
echo "rclone Password: $RCLONE_PASSWORD"
|
||||
} >>~/rclone.creds
|
||||
echo "${RELEASE}" >/opt/rclone_version.txt
|
||||
rm -f "$temp_file"
|
||||
msg_ok "Installed rclone"
|
||||
|
||||
msg_info "Enabling rclone Service"
|
||||
cat <<EOF >/etc/init.d/rclone
|
||||
#!/sbin/openrc-run
|
||||
description="rclone Service"
|
||||
command="/opt/rclone/rclone"
|
||||
command_args="rcd --rc-web-gui --rc-web-gui-no-open-browser --rc-addr :3000 --rc-htpasswd /opt/rclone/login.pwd"
|
||||
command_background="true"
|
||||
command_user="root"
|
||||
pidfile="/var/run/rclone.pid"
|
||||
|
||||
depend() {
|
||||
use net
|
||||
}
|
||||
EOF
|
||||
chmod +x /etc/init.d/rclone
|
||||
$STD rc-update add rclone default
|
||||
msg_ok "Enabled rclone Service"
|
||||
|
||||
msg_info "Starting rclone"
|
||||
$STD service rclone start
|
||||
msg_ok "Started rclone"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -rf "$temp_file"
|
||||
$STD apk cache clean
|
||||
msg_ok "Cleaned"
|
@ -1,83 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: Slaviša Arežina (tremor021)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/steveiliop56/tinyauth
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apk add --no-cache \
|
||||
npm \
|
||||
curl \
|
||||
go
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Installing tinyauth"
|
||||
temp_file=$(mktemp)
|
||||
$STD npm install -g bun
|
||||
mkdir -p /opt/tinyauth
|
||||
RELEASE=$(curl -s https://api.github.com/repos/steveiliop56/tinyauth/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
curl -fsSL "https://github.com/steveiliop56/tinyauth/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file"
|
||||
tar -xzf "$temp_file" -C /opt/tinyauth --strip-components=1
|
||||
cd /opt/tinyauth/frontend
|
||||
$STD bun install
|
||||
$STD bun run build
|
||||
mv dist /opt/tinyauth/internal/assets/
|
||||
cd /opt/tinyauth
|
||||
$STD go mod download
|
||||
CGO_ENABLED=0 go build -ldflags "-s -w"
|
||||
{
|
||||
echo "tinyauth Credentials"
|
||||
echo "Username: admin@example.com"
|
||||
echo "Password: admin"
|
||||
} >>~/tinyauth.creds
|
||||
echo "${RELEASE}" >/opt/tinyauth_version.txt
|
||||
msg_ok "Installed tinyauth"
|
||||
|
||||
msg_info "Enabling tinyauth Service"
|
||||
SECRET=$(head -c 16 /dev/urandom | xxd -p -c 16 | tr -d '\n')
|
||||
{
|
||||
echo "SECRET=${SECRET}"
|
||||
echo "USERS=admin@example.com:\$2a\$10\$CrTK.W7WXSClo3ZY1yJUFupg5UdV8WNcynEhZhJFNjhGQB.Ga0ZDm"
|
||||
echo "APP_URL=http://localhost:3000"
|
||||
} >>/opt/tinyauth/.env
|
||||
|
||||
cat <<EOF >/etc/init.d/tinyauth
|
||||
#!/sbin/openrc-run
|
||||
description="tinyauth Service"
|
||||
|
||||
command="/opt/tinyauth/tinyauth"
|
||||
directory="/opt/tinyauth"
|
||||
command_user="root"
|
||||
command_background="true"
|
||||
pidfile="/var/run/tinyauth.pid"
|
||||
|
||||
start_pre() {
|
||||
if [ -f "/opt/tinyauth/.env" ]; then
|
||||
export \$(grep -v '^#' /opt/tinyauth/.env | xargs)
|
||||
fi
|
||||
}
|
||||
|
||||
depend() {
|
||||
use net
|
||||
}
|
||||
EOF
|
||||
|
||||
chmod +x /etc/init.d/tinyauth
|
||||
$STD rc-update add tinyauth default
|
||||
msg_ok "Enabled tinyauth Service"
|
||||
|
||||
msg_info "Starting tinyauth"
|
||||
$STD service tinyauth start
|
||||
msg_ok "Started tinyauth"
|
||||
|
||||
motd_ssh
|
||||
customize
|
@ -1,54 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# 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 \
|
||||
ca-certificates
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
NODE_VERSION="22" NODE_MODULE="pnpm@latest" install_node_and_modules
|
||||
|
||||
msg_info "Installing Fumadocs"
|
||||
export NODE_OPTIONS="--max-old-space-size=4096"
|
||||
mkdir -p /opt/fumadocs
|
||||
cd /opt/fumadocs
|
||||
pnpm create fumadocs-app
|
||||
PROJECT_NAME=$(find . -maxdepth 1 -type d ! -name '.' ! -name '..' | sed 's|^\./||')
|
||||
echo "$PROJECT_NAME" >/opt/fumadocs/.projectname
|
||||
msg_ok "Installed Fumadocs"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/fumadocs_$PROJECT_NAME.service
|
||||
[Unit]
|
||||
Description=Fumadocs Documentation Server
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=/opt/fumadocs/$PROJECT_NAME
|
||||
ExecStart=/usr/bin/pnpm run dev
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now fumadocs_$PROJECT_NAME
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
Loading…
x
Reference in New Issue
Block a user