mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-09-07 22:36:45 +00:00
Compare commits
6 Commits
node-drift
...
add-script
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
56c57c56dd | ||
|
|
b80bb53160 | ||
|
|
8910825fd8 | ||
|
|
b99dab130c | ||
|
|
169f57c2e0 | ||
|
|
633e9f6a03 |
14
.github/workflows/check-node-versions.yml
generated
vendored
14
.github/workflows/check-node-versions.yml
generated
vendored
@@ -497,15 +497,25 @@ jobs:
|
||||
PR_EOF
|
||||
)
|
||||
|
||||
# The label goes on at creation, not in a second call: it is what
|
||||
# Labels go on at creation, not in a second call: they are what
|
||||
# exempts the PR from the template check, and that check runs on
|
||||
# "opened" — a label added a moment later can arrive too late.
|
||||
#
|
||||
# "keep-open" rather than "automated pr" for that exemption: both
|
||||
# skip the template check, but changelog-pr.yml drops every PR
|
||||
# carrying "automated pr" (it marks its own PR with it), so that
|
||||
# label would keep these bumps out of the changelog entirely.
|
||||
# "update script" and "bugfix" place them under Updated Scripts →
|
||||
# Bug Fixes; the autolabeler cannot do it, since a PR opened with
|
||||
# GITHUB_TOKEN never triggers its pull_request_target run.
|
||||
if url=$(gh pr create \
|
||||
--title "${slug}: bump Node.js from ${our} to ${upstream}" \
|
||||
--body "$body" \
|
||||
--base main \
|
||||
--head "$branch" \
|
||||
--label "automated pr" 2>/dev/null); then
|
||||
--label "keep-open" \
|
||||
--label "update script" \
|
||||
--label "bugfix" 2>/dev/null); then
|
||||
printf '%s|open|%s\n' "$slug" "$url" >>/tmp/drift_prs.txt
|
||||
else
|
||||
printf '%s|failed||\n' "$slug" >>/tmp/drift_prs.txt
|
||||
|
||||
@@ -546,6 +546,8 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- kaneo: bump Node.js from 22 to 24 [@github-actions[bot]](https://github.com/github-actions[bot]) ([#17086](https://github.com/community-scripts/ProxmoxVE/pull/17086))
|
||||
- iobroker: bump Node.js from 24 to 26 [@github-actions[bot]](https://github.com/github-actions[bot]) ([#17085](https://github.com/community-scripts/ProxmoxVE/pull/17085))
|
||||
- reactive-resume: repair any wrong WorkingDirectory on update [@MickLesk](https://github.com/MickLesk) ([#17068](https://github.com/community-scripts/ProxmoxVE/pull/17068))
|
||||
- mediamtx: keep mediamtx.yml across updates [@MickLesk](https://github.com/MickLesk) ([#17069](https://github.com/community-scripts/ProxmoxVE/pull/17069))
|
||||
- omnitools: allow remote action while npm ci [@MickLesk](https://github.com/MickLesk) ([#17070](https://github.com/community-scripts/ProxmoxVE/pull/17070))
|
||||
|
||||
6
ct/headers/journiv
Normal file
6
ct/headers/journiv
Normal file
@@ -0,0 +1,6 @@
|
||||
__ _
|
||||
/ /___ __ ___________ (_) __
|
||||
__ / / __ \/ / / / ___/ __ \/ / | / /
|
||||
/ /_/ / /_/ / /_/ / / / / / / /| |/ /
|
||||
\____/\____/\__,_/_/ /_/ /_/_/ |___/
|
||||
|
||||
@@ -31,7 +31,7 @@ function update_script() {
|
||||
exit
|
||||
fi
|
||||
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
NODE_VERSION="26" NPM_VERSION="11" setup_nodejs
|
||||
|
||||
msg_info "Updating ${APP} LXC"
|
||||
$STD apt update
|
||||
|
||||
69
ct/journiv.sh
Normal file
69
ct/journiv.sh
Normal file
@@ -0,0 +1,69 @@
|
||||
#!/usr/bin/env bash
|
||||
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
||||
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/journiv/journiv-app
|
||||
|
||||
APP="Journiv"
|
||||
var_tags="${var_tags:-journal;notes}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-2048}"
|
||||
var_disk="${var_disk:-12}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_arm64="${var_arm64:-yes}"
|
||||
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/journiv ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "journiv" "journiv/journiv-app"; then
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop journiv journiv-worker journiv-beat
|
||||
msg_ok "Stopped Services"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "journiv" "journiv/journiv-app" "tarball"
|
||||
|
||||
msg_info "Updating Python Environment"
|
||||
cd /opt/journiv
|
||||
$STD uv sync --locked --no-editable --no-install-project
|
||||
msg_ok "Updated Python Environment"
|
||||
|
||||
msg_info "Running Database Migrations"
|
||||
set -a
|
||||
source /opt/journiv.env
|
||||
set +a
|
||||
$STD /opt/journiv/.venv/bin/python -c "from alembic.config import main; main(['upgrade', 'head'])"
|
||||
msg_ok "Ran Database Migrations"
|
||||
|
||||
msg_info "Starting Services"
|
||||
systemctl start journiv journiv-worker journiv-beat
|
||||
msg_ok "Started Services"
|
||||
msg_ok "Updated successfully!"
|
||||
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 "${GATEWAY}${BGN}http://${IP}:8000${CL}"
|
||||
@@ -42,7 +42,7 @@ function update_script() {
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "kaneo" "usekaneo/kaneo" "tarball"
|
||||
|
||||
PNPM_VERSION=$(sed -n 's/.*"packageManager": "pnpm@\([^"+]*\).*/\1/p' /opt/kaneo/package.json)
|
||||
NODE_VERSION="22" NODE_MODULE="pnpm@${PNPM_VERSION:-10.32.1}" setup_nodejs
|
||||
NODE_VERSION="24" NODE_MODULE="pnpm@${PNPM_VERSION:-10.32.1}" setup_nodejs
|
||||
|
||||
restore_backup
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ EOF
|
||||
sed -i "s/^SERVER_VERSION=.*$/SERVER_VERSION=${CHECK_UPDATE_RELEASE#v}/" /etc/karakeep/karakeep.env
|
||||
# Node 24.19.x crashes better-sqlite3 on cleanup (karakeep-app/karakeep#2989); stay on 22 LTS until upstream reverts.
|
||||
MODULE_VERSION="$(jq -r '.packageManager | split("@")[1]' /opt/karakeep/package.json)"
|
||||
NODE_VERSION="24" NODE_MODULE="corepack,pnpm@${MODULE_VERSION}" setup_nodejs
|
||||
NODE_VERSION="22" NODE_MODULE="corepack,pnpm@${MODULE_VERSION}" setup_nodejs
|
||||
setup_meilisearch
|
||||
|
||||
msg_info "Updating Karakeep"
|
||||
|
||||
@@ -28,7 +28,7 @@ if [[ ! "$CONFIRM" =~ ^([yY][eE][sS]|[yY])$ ]]; then
|
||||
exit 10
|
||||
fi
|
||||
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
NODE_VERSION="26" NPM_VERSION="11" setup_nodejs
|
||||
|
||||
msg_info "Installing ioBroker (Patience)"
|
||||
$STD bash <(curl -fsSL https://iobroker.net/install.sh)
|
||||
|
||||
131
install/journiv-install.sh
Normal file
131
install/journiv-install.sh
Normal file
@@ -0,0 +1,131 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/journiv/journiv-app
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y \
|
||||
build-essential \
|
||||
libffi-dev \
|
||||
libpq-dev \
|
||||
libmagic1 \
|
||||
libheif1 \
|
||||
libde265-0 \
|
||||
libpango-1.0-0 \
|
||||
libpangoft2-1.0-0 \
|
||||
redis-server
|
||||
systemctl enable -q --now redis-server
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
setup_ffmpeg
|
||||
PG_VERSION="17" setup_postgresql
|
||||
PG_DB_NAME="journiv" PG_DB_USER="journiv" setup_postgresql_db
|
||||
UV_PYTHON="3.12" setup_uv
|
||||
|
||||
fetch_and_deploy_gh_release "journiv" "journiv/journiv-app" "tarball"
|
||||
|
||||
msg_info "Setting up Python Environment"
|
||||
cd /opt/journiv
|
||||
$STD uv sync --locked --no-editable --no-install-project
|
||||
msg_ok "Set up Python Environment"
|
||||
|
||||
msg_info "Configuring Journiv"
|
||||
mkdir -p /opt/journiv_data/{media,logs,exports,imports/temp}
|
||||
cat <<EOF >/opt/journiv.env
|
||||
ENVIRONMENT=production
|
||||
SECRET_KEY=$(openssl rand -hex 32)
|
||||
DB_DRIVER=postgres
|
||||
DATABASE_URL=postgresql://journiv:${PG_DB_PASS}@localhost:5432/journiv
|
||||
REDIS_URL=redis://127.0.0.1:6379/0
|
||||
MEDIA_ROOT=/opt/journiv_data/media
|
||||
LOG_DIR=/opt/journiv_data/logs
|
||||
EXPORT_DIR=/opt/journiv_data/exports
|
||||
IMPORT_TEMP_DIR=/opt/journiv_data/imports/temp
|
||||
DOMAIN_NAME=${LOCAL_IP}
|
||||
DOMAIN_SCHEME=http
|
||||
PYTHONPATH=/opt/journiv
|
||||
EOF
|
||||
chmod 600 /opt/journiv.env
|
||||
msg_ok "Configured Journiv"
|
||||
|
||||
msg_info "Initializing Database"
|
||||
set -a
|
||||
source /opt/journiv.env
|
||||
set +a
|
||||
$STD /opt/journiv/.venv/bin/python -c "from alembic.config import main; main(['upgrade', 'head'])"
|
||||
SKIP_DATA_SEEDING=false $STD /opt/journiv/.venv/bin/python -c "from app.core.database import seed_initial_data; seed_initial_data()"
|
||||
msg_ok "Initialized Database"
|
||||
|
||||
msg_info "Creating Services"
|
||||
cat <<EOF >/etc/systemd/system/journiv.service
|
||||
[Unit]
|
||||
Description=Journiv
|
||||
Wants=network-online.target
|
||||
After=network-online.target postgresql.service redis-server.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/journiv
|
||||
EnvironmentFile=/opt/journiv.env
|
||||
ExecStart=/opt/journiv/.venv/bin/python -m gunicorn app.main:app -w 2 -k uvicorn.workers.UvicornWorker --timeout 300 -b 0.0.0.0:8000
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
cat <<EOF >/etc/systemd/system/journiv-worker.service
|
||||
[Unit]
|
||||
Description=Journiv Celery Worker
|
||||
Wants=network-online.target
|
||||
After=network-online.target journiv.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/journiv
|
||||
EnvironmentFile=/opt/journiv.env
|
||||
ExecStart=/opt/journiv/.venv/bin/python -m celery -A app.core.celery_app worker --loglevel=info
|
||||
Restart=on-failure
|
||||
RestartSec=10
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
cat <<EOF >/etc/systemd/system/journiv-beat.service
|
||||
[Unit]
|
||||
Description=Journiv Celery Beat
|
||||
Wants=network-online.target
|
||||
After=network-online.target journiv.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/journiv
|
||||
EnvironmentFile=/opt/journiv.env
|
||||
ExecStart=/opt/journiv/.venv/bin/python -m celery -A app.core.celery_app beat --loglevel=info --scheduler redbeat.RedBeatScheduler --pidfile=/run/journiv-beat.pid
|
||||
Restart=on-failure
|
||||
RestartSec=10
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now journiv journiv-worker journiv-beat
|
||||
msg_ok "Created Services"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -22,7 +22,7 @@ PG_DB_NAME="kaneo" PG_DB_USER="kaneo" setup_postgresql_db
|
||||
fetch_and_deploy_gh_release "kaneo" "usekaneo/kaneo" "tarball"
|
||||
|
||||
PNPM_VERSION=$(sed -n 's/.*"packageManager": "pnpm@\([^"+]*\).*/\1/p' /opt/kaneo/package.json)
|
||||
NODE_VERSION="22" NODE_MODULE="pnpm@${PNPM_VERSION:-10.32.1}" setup_nodejs
|
||||
NODE_VERSION="24" NODE_MODULE="pnpm@${PNPM_VERSION:-10.32.1}" setup_nodejs
|
||||
|
||||
msg_info "Configuring Kaneo"
|
||||
cat <<EOF >/opt/kaneo/.env
|
||||
|
||||
@@ -33,7 +33,7 @@ fetch_and_deploy_gh_release "karakeep" "karakeep-app/karakeep" "tarball"
|
||||
cd /opt/karakeep
|
||||
# Node 24.19.x crashes better-sqlite3 on cleanup (karakeep-app/karakeep#2989); stay on 22 LTS until upstream reverts.
|
||||
MODULE_VERSION="$(jq -r '.packageManager | split("@")[1]' /opt/karakeep/package.json)"
|
||||
NODE_VERSION="24" NODE_MODULE="pnpm@${MODULE_VERSION}" setup_nodejs
|
||||
NODE_VERSION="22" NODE_MODULE="pnpm@${MODULE_VERSION}" setup_nodejs
|
||||
|
||||
msg_info "Installing external JavaScript Extension for yt-dlp"
|
||||
$STD pip install -U yt-dlp-ejs --break-system-packages
|
||||
|
||||
Reference in New Issue
Block a user