Skip to content

Commit 61978dc

Browse files
push-app-to-main[bot]MickLeskCrazyWolf13
authored
Maintainerr (#16716)
* Add maintainerr (ct) * Update maintainerr.sh script header comments * add: author * add: author * Fix backup restoration and cleanup in maintainerr.sh * Refactor install script message order and cleanup Rearranged messages for clarity and removed redundant disk space reclamation message. --------- Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com> Co-authored-by: CanbiZ (MickLesk) <47820557+MickLesk@users.noreply.github.com> Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>
1 parent c439775 commit 61978dc

3 files changed

Lines changed: 170 additions & 0 deletions

File tree

ct/headers/maintainerr

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
__ ___ _ __ _
2+
/ |/ /___ _(_)___ / /_____ _(_)___ ___ __________
3+
/ /|_/ / __ `/ / __ \/ __/ __ `/ / __ \/ _ \/ ___/ ___/
4+
/ / / / /_/ / / / / / /_/ /_/ / / / / / __/ / / /
5+
/_/ /_/\__,_/_/_/ /_/\__/\__,_/_/_/ /_/\___/_/ /_/
6+

ct/maintainerr.sh

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
#!/usr/bin/env bash
2+
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
3+
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
4+
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
5+
# Copyright (c) 2021-2026 community-scripts ORG
6+
# Author: Karolis Stanelis (kstanelis)
7+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
8+
# Source: https://github.com/Maintainerr/Maintainerr
9+
10+
APP="Maintainerr"
11+
var_tags="${var_tags:-media;arr;cleanup}"
12+
var_cpu="${var_cpu:-4}"
13+
var_ram="${var_ram:-8192}"
14+
var_disk="${var_disk:-24}"
15+
var_os="${var_os:-debian}"
16+
var_version="${var_version:-13}"
17+
#var_arm64="${var_arm64:-no}" # unset = ask the user; set yes/no only when verified
18+
var_unprivileged="${var_unprivileged:-1}"
19+
20+
header_info "$APP"
21+
variables
22+
color
23+
catch_errors
24+
25+
function update_script() {
26+
header_info
27+
check_container_storage
28+
check_container_resources
29+
30+
if [[ ! -d /opt/maintainerr ]]; then
31+
msg_error "No ${APP} Installation Found!"
32+
exit
33+
fi
34+
35+
if check_for_gh_release "maintainerr" "Maintainerr/Maintainerr"; then
36+
msg_info "Stopping Service"
37+
systemctl stop maintainerr
38+
msg_ok "Stopped Service"
39+
40+
create_backup /opt/data /opt/maintainerr/.env
41+
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "maintainerr" "Maintainerr/Maintainerr" "tarball" "latest" "/opt/maintainerr"
42+
restore_backup
43+
44+
msg_info "Rebuilding Maintainerr (Patience)"
45+
cd /opt/maintainerr
46+
export COREPACK_ENABLE_DOWNLOAD_PROMPT=0
47+
export NODE_OPTIONS="--max-old-space-size=4096"
48+
$STD corepack enable
49+
$STD corepack prepare yarn@4.11.0 --activate
50+
$STD yarn config set enableTelemetry 0
51+
$STD yarn install --network-timeout 300000
52+
$STD yarn turbo build --concurrency=1
53+
cp -r apps/ui/dist apps/server/dist/ui
54+
cp -r apps/server/assets apps/server/dist/assets
55+
find apps/server/dist/ui -type f -not -path '*/node_modules/*' -print0 | xargs -0 sed -i "s,/__PATH_PREFIX__,,g"
56+
$STD yarn workspaces focus --all --production
57+
rm -rf /opt/maintainerr/.yarn/cache /opt/maintainerr/.turbo /opt/maintainerr/apps/ui
58+
sed -i '/^npm_package_version=/d;/^VERSION_TAG=/d' /opt/maintainerr/.env
59+
{
60+
echo "VERSION_TAG=stable"
61+
echo "npm_package_version=$(cat ~/.maintainerr)"
62+
} >>/opt/maintainerr/.env
63+
msg_ok "Rebuilt Maintainerr"
64+
65+
msg_info "Starting Service"
66+
systemctl start maintainerr
67+
msg_ok "Started Service"
68+
msg_ok "Updated Successfully!"
69+
fi
70+
exit
71+
}
72+
73+
start
74+
build_container
75+
description
76+
77+
msg_ok "Completed Successfully!\n"
78+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
79+
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
80+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:6246${CL}"

install/maintainerr-install.sh

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2026 community-scripts ORG
4+
# Author: Karolis Stanelis (kstanelis)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/Maintainerr/Maintainerr
7+
8+
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
9+
color
10+
verb_ip6
11+
catch_errors
12+
setting_up_container
13+
network_check
14+
update_os
15+
16+
msg_info "Installing Dependencies"
17+
$STD apt install -y \
18+
build-essential \
19+
pkg-config \
20+
libcairo2-dev \
21+
libpango1.0-dev \
22+
libjpeg-dev \
23+
libgif-dev \
24+
libpixman-1-dev \
25+
librsvg2-dev
26+
msg_ok "Installed Dependencies"
27+
28+
NODE_VERSION="24" setup_nodejs
29+
30+
fetch_and_deploy_gh_release "maintainerr" "Maintainerr/Maintainerr" "tarball" "latest" "/opt/maintainerr"
31+
32+
msg_info "Building Maintainerr (Patience)"
33+
cd /opt/maintainerr
34+
export COREPACK_ENABLE_DOWNLOAD_PROMPT=0
35+
export NODE_OPTIONS="--max-old-space-size=4096"
36+
$STD corepack enable
37+
$STD corepack prepare yarn@4.11.0 --activate
38+
$STD yarn config set enableTelemetry 0
39+
$STD yarn install --network-timeout 300000
40+
$STD yarn turbo build --concurrency=1
41+
cp -r apps/ui/dist apps/server/dist/ui
42+
cp -r apps/server/assets apps/server/dist/assets
43+
find apps/server/dist/ui -type f -not -path '*/node_modules/*' -print0 | xargs -0 sed -i "s,/__PATH_PREFIX__,,g"
44+
$STD yarn workspaces focus --all --production
45+
rm -rf /opt/maintainerr/.yarn/cache /opt/maintainerr/.turbo /opt/maintainerr/apps/ui
46+
msg_ok "Built Maintainerr"
47+
48+
msg_info "Configuring Environment"
49+
mkdir -p /opt/data/logs
50+
ln -sfn /opt/maintainerr /opt/app
51+
cat <<EOF >/opt/maintainerr/.env
52+
NODE_ENV=production
53+
DATA_DIR=/opt/data
54+
UI_PORT=6246
55+
UI_HOSTNAME=0.0.0.0
56+
BASE_PATH=
57+
VERSION_TAG=stable
58+
npm_package_version=$(cat ~/.maintainerr)
59+
EOF
60+
msg_ok "Configured Environment"
61+
62+
msg_info "Creating Service"
63+
cat <<EOF >/etc/systemd/system/maintainerr.service
64+
[Unit]
65+
Description=Maintainerr
66+
After=network.target
67+
68+
[Service]
69+
Type=simple
70+
WorkingDirectory=/opt/maintainerr/apps/server
71+
EnvironmentFile=/opt/maintainerr/.env
72+
ExecStart=/usr/bin/node dist/main
73+
Restart=always
74+
RestartSec=10
75+
76+
[Install]
77+
WantedBy=multi-user.target
78+
EOF
79+
systemctl enable -q --now maintainerr
80+
msg_ok "Created Service"
81+
82+
motd_ssh
83+
customize
84+
cleanup_lxc

0 commit comments

Comments
 (0)