Compare commits

...
Author SHA1 Message Date
CanbiZ (MickLesk) feb70b2a68 Refactor storyteller.sh for improved deployment process 2026-10-23 13:29:58 +02:00
MickLesk 4b804e83a2 Storyteller: follow the script conventions
python3 ships with the template, update uses ensure_dependencies, no comments.
2026-10-23 11:32:29 +02:00
MickLesk b26cdd55dc Storyteller: build the runtime like upstream's Dockerfile
Only the Next.js app was built before. The standalone server now also gets the worker and file-write-worker bundles, the native align prebuilds, the icu-segmentation wasm, @parcel/watcher and kuromoji, plus the env vars that point at them, and whisper.cpp with the tiny.en model is installed through ghost-story's CLI. Packages and the readium version follow upstream (#16628).

Update still used the pre-monorepo paths, and CLEAN_INSTALL wiped /opt/storyteller including the data directory; it now keeps data/, rebuilds the same way and rewrites the unit, so existing installs move over.
2026-10-23 10:52:44 +02:00
community-scripts-pr-app[bot]andgithub-actions[bot] 7d20051744 Update CHANGELOG.md (#18082)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-23 08:31:27 +00:00
community-scripts-pr-app[bot]andgithub-actions[bot] 8bff513bb7 Update CHANGELOG.md (#18081)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-23 08:30:59 +00:00
community-scripts-pr-app[bot]andgithub-actions[bot] f64f069841 Update CHANGELOG.md (#18080)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-23 08:29:14 +00:00
community-scripts-pr-app[bot]andgithub-actions[bot] f43ba1fc12 Update CHANGELOG.md (#18078)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-23 08:07:36 +00:00
community-scripts-pr-app[bot]andgithub-actions[bot] dc763cb39b Update CHANGELOG.md (#18068)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-22 12:45:55 +00:00
community-scripts-pr-app[bot]andgithub-actions[bot] 0a3a61a1ee Update CHANGELOG.md (#18067)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-22 11:51:04 +00:00
CanbiZ (MickLesk) 891be92dc9 Refactor: Cryptpad (#18065)
* CryptPad: configure 2026.10.0 through infra.js

2026.10.0 moved the origins, host and ports from config.js to infra.js and no longer derives the sandbox origin, so updated instances pointed the sandbox at the browser's own localhost and hung at 'loading drive' (#18063). Update builds infra.js once from config.js, install writes it directly (the config.js seds matched nothing anymore). install-onlyoffice.sh is now install-office.sh; update runs it only where office was installed.

* CryptPad: repair instances already on 2026.10.0

Instances updated before this fix have no infra.js but already the new version, so the migration would wait for the next release. Update runs again for them, and a config.js from the 2026.10.0 example (no origin at all) gets the container address like a fresh install.
2026-10-22 13:50:33 +02:00
community-scripts-pr-app[bot]andgithub-actions[bot] 6a3370d33a Update CHANGELOG.md (#18066)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-22 10:49:42 +00:00
community-scripts-pr-app[bot]andgithub-actions[bot] a25dcd86bb Update CHANGELOG.md (#18064)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-22 08:49:40 +00:00
FlorianandCanbiZ 2dcdbb4b08 Zabbix: keep unattended updates on the installed series (#18051)
* fix(zabbix): keep unattended updates on the installed series

update_script() asked for a Zabbix version unconditionally. update-apps.sh
exports PHS_SILENT=1 for unattended runs, so that read either blocks the
whole batch or, with stdin closed, fails the container with exit 1 after
its services were already stopped.

Resolve the installed series from the zabbix-release package before
touching systemd, and ask only when the run is interactive. Unattended
runs stay on the installed series and still get minor and patch updates;
changing series remains an attended decision. When the series cannot be
read, exit 75 so the batch logs the container as skipped instead of
failing it.

Fixes #18046

* Clean up comments in zabbix.sh

Removed comments regarding unattended runs and series changes.

---------

Co-authored-by: CanbiZ (MickLesk) <47820557+MickLesk@users.noreply.github.com>
2026-10-22 10:49:14 +02:00
community-scripts-pr-app[bot]andgithub-actions[bot] d8e39d8bc7 Update CHANGELOG.md (#18062)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-22 05:22:07 +00:00
github-actions[bot] 7121ad7d8e chore(ct): sync sparkyfitness defaults from PocketBase (#18061)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-22 07:21:41 +02:00
community-scripts-pr-app[bot]andgithub-actions[bot] db2390e8ae Update CHANGELOG.md (#18058)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-21 18:43:54 +00:00
CerberusStyle ff94743030 Immich: bump release version to v3.3.5 (CVE) (#18057)
* Update Immich release version to v3.3.5

version push due to CVE

* Update release version from v3.3.4 to v3.3.5
2026-10-21 20:43:24 +02:00
9 changed files with 195 additions and 76 deletions

No files matched your search

+31
View File
@@ -565,12 +565,43 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
</details>
## 2026-10-23
### 💾 Core
- error output: report a failure inside a subshell once [@MickLesk](https://github.com/MickLesk) ([core#162](https://github.com/community-scripts/core/pull/162))
- general: allow Composer as root in every script [@MickLesk](https://github.com/MickLesk) ([core#161](https://github.com/community-scripts/core/pull/161))
- lxc-updater: skip the resource check when the container cannot read its RAM [@MickLesk](https://github.com/MickLesk) ([core#160](https://github.com/community-scripts/core/pull/160))
- vm-core: let vm_timezone_default survive a host without /etc/timezone [@MickLesk](https://github.com/MickLesk) ([core#159](https://github.com/community-scripts/core/pull/159))
## 2026-10-22
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- Zabbix: keep unattended updates on the installed series [@florianpunz](https://github.com/florianpunz) ([#18051](https://github.com/community-scripts/ProxmoxVE/pull/18051))
- #### 🔧 Refactor
- Refactor: Cryptpad [@MickLesk](https://github.com/MickLesk) ([#18065](https://github.com/community-scripts/ProxmoxVE/pull/18065))
### 💾 Core
- Incus: drive a remote Incus server from the client's default remote [@MickLesk](https://github.com/MickLesk) ([core#154](https://github.com/community-scripts/core/pull/154))
- Deploy the release again when an update is redone [@MickLesk](https://github.com/MickLesk) ([core#158](https://github.com/community-scripts/core/pull/158))
### ❔ Uncategorized
- chore(ct): sync sparkyfitness defaults with PocketBase [@github-actions[bot]](https://github.com/github-actions[bot]) ([#18061](https://github.com/community-scripts/ProxmoxVE/pull/18061))
## 2026-10-21
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- Immich: bump release version to v3.3.5 (CVE) [@CerberusStyle](https://github.com/CerberusStyle) ([#18057](https://github.com/community-scripts/ProxmoxVE/pull/18057))
- DroppedNeedle: pass release version to the app via COMMIT_TAG [@MickLesk](https://github.com/MickLesk) ([#18042](https://github.com/community-scripts/ProxmoxVE/pull/18042))
### 💾 Core
+27 -3
View File
@@ -30,12 +30,14 @@ function update_script() {
msg_error "No ${APP} Installation Found!"
exit
fi
# Updates to 2026.10.0 finished without infra.js; run them again so it gets written
[[ -f /opt/cryptpad/config/infra.example.js && ! -f /opt/cryptpad/config/infra.js ]] && rm -f ~/.cryptpad
if check_for_gh_release "cryptpad" "cryptpad/cryptpad"; then
msg_info "Stopping Service"
systemctl stop cryptpad
msg_ok "Stopped Service"
create_backup /opt/cryptpad/config/config.js /opt/cryptpad/www/common/onlyoffice/dist
create_backup /opt/cryptpad/config/config.js /opt/cryptpad/config/infra.js /opt/cryptpad/www/common/onlyoffice/dist
CLEAN_INSTALL=1 CLEAN_INSTALL_KEEP="blob block customize data datastore onlyoffice-conf" fetch_and_deploy_gh_release "cryptpad" "cryptpad/cryptpad" "tarball"
@@ -45,8 +47,30 @@ function update_script() {
cd /opt/cryptpad
$STD npm ci --allow-git=all
$STD npm run install:components
if [ -f "/opt/cryptpad/install-onlyoffice.sh" ]; then
$STD bash /opt/cryptpad/install-onlyoffice.sh --accept-license
if [[ -d /opt/cryptpad/www/common/onlyoffice/dist ]]; then
$STD bash /opt/cryptpad/install-office.sh --accept-license
fi
if [[ ! -f /opt/cryptpad/config/infra.js ]]; then
# 2026.10.0 reads the network settings from infra.js and no longer derives the sandbox origin
LOCAL_IP="$LOCAL_IP" node - <<'EOF'
const c = require("/opt/cryptpad/config/config.js");
const i = require("/opt/cryptpad/config/infra.example.js");
const port = c.httpPort || i.public.httpPort;
const safePort = c.httpSafePort || port + 1;
const origin = (c.httpUnsafeOrigin || `http://${process.env.LOCAL_IP}:${port}`).replace(/\/+$/, "");
const sandbox = new URL(origin);
sandbox.port = safePort;
Object.assign(i.public, {
origin,
sandboxOrigin: (c.httpSafeOrigin || sandbox.origin).replace(/\/+$/, ""),
httpHost: c.httpAddress || (c.httpUnsafeOrigin ? i.public.httpHost : "0.0.0.0"),
httpPort: port,
httpSafePort: safePort,
externalWebsocketURL: c.externalWebsocketURL,
fileHost: c.fileHost,
});
require("fs").writeFileSync("/opt/cryptpad/config/infra.js", "module.exports = " + JSON.stringify(i, null, 4) + ";\n");
EOF
fi
$STD npm run build
msg_ok "Updated CryptaPad"
+1 -1
View File
@@ -77,7 +77,7 @@ EOF
BASE_DIR=${STAGING_DIR}/base-images
SOURCE_DIR=${STAGING_DIR}/image-source
cd /tmp
RELEASE="v3.3.4"
RELEASE="v3.3.5"
if [[ -f ~/.intel_version ]]; then
INTEL_SRC="https://raw.githubusercontent.com/immich-app/immich/${RELEASE}/machine-learning"
curl -fsSL "${INTEL_SRC}/scripts/install-intel-runtime.sh" -o ./intel-runtime 2>/dev/null ||
+1 -1
View File
@@ -9,7 +9,7 @@ source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_
APP="SparkyFitness"
var_tags="${var_tags:-health;fitness}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}"
var_ram="${var_ram:-4096}"
var_disk="${var_disk:-7}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
+54 -22
View File
@@ -31,42 +31,75 @@ function update_script() {
exit
fi
NODE_VERSION="24" NODE_MODULE="corepack,yarn" setup_nodejs
NODE_VERSION="24" NODE_MODULE="corepack" setup_nodejs
if check_for_gl_release "storyteller" "storyteller-platform/storyteller" "" "" "web-v2"; then
msg_info "Stopping Service"
systemctl stop storyteller
msg_ok "Stopped Service"
ensure_dependencies cmake argon2 libcurl4t64 libxml2
fetch_and_deploy_gh_release "readium" "readium/cli" "prebuild" "v0.9.1" "/opt/readium" "readium_linux_$(arch_resolve "x86_64" "arm64").tar.gz"
create_backup /opt/storyteller/.env
CLEAN_INSTALL=1 fetch_and_deploy_gl_release "storyteller" "storyteller-platform/storyteller" "tarball" "latest" "/opt/storyteller" "" "web-v2"
CLEAN_INSTALL=1 CLEAN_INSTALL_KEEP="data" fetch_and_deploy_gl_release "storyteller" "storyteller-platform/storyteller" "tarball" "latest" "/opt/storyteller" "" "web-v2"
restore_backup
msg_info "Rebuilding Storyteller"
msg_info "Building Storyteller (Patience)"
cd /opt/storyteller
export NODE_OPTIONS="--max-old-space-size=4096"
$STD corepack yarn install --network-timeout 600000
$STD gcc -g -fPIC -rdynamic -shared web/sqlite/uuid.c -o web/sqlite/uuid.c.so
export CI=1
$STD corepack yarn install
export NODE_ENV=production
export NEXT_TELEMETRY_DISABLED=1
export SQLITE_NATIVE_BINDING=/opt/storyteller/node_modules/better-sqlite3/build/Release/better_sqlite3.node
$STD corepack yarn workspaces foreach -Rpt --from @storyteller-platform/web --exclude @storyteller-platform/eslint run build
mkdir -p /opt/storyteller/web/.next/standalone/web/.next/static
cp -rT /opt/storyteller/web/.next/static /opt/storyteller/web/.next/standalone/web/.next/static
if [[ -d /opt/storyteller/web/public ]]; then
mkdir -p /opt/storyteller/web/.next/standalone/web/public
cp -rT /opt/storyteller/web/public /opt/storyteller/web/.next/standalone/web/public
STANDALONE=/opt/storyteller/applications/web/.next/standalone
WEB_DIR="$STANDALONE/applications/web"
mkdir -p "$WEB_DIR"/{public,.next/static,.next/cache,migrations,sqlite,scripts}
cp -rT applications/web/public "$WEB_DIR/public"
cp -rT applications/web/.next/static "$WEB_DIR/.next/static"
cp -rT applications/web/migrations "$WEB_DIR/migrations"
cp applications/web/sqlite/uuid.c.so "$WEB_DIR/sqlite/"
cp docker-scripts/reset-password.sh "$WEB_DIR/scripts/"
cp -r applications/web/work-dist applications/web/file-write-dist "$WEB_DIR/"
mkdir -p "$WEB_DIR/work-dist/@storyteller-platform/align/prebuilds"
cp -r "libraries/align/prebuilds/linux-$(arch_resolve "x64" "arm64")" "$WEB_DIR/work-dist/@storyteller-platform/align/prebuilds/"
cp node_modules/@echogarden/icu-segmentation-wasm/wasm/*.wasm "$WEB_DIR/work-dist/"
cp -rT node_modules/@parcel "$STANDALONE/node_modules/@parcel"
cp -rT node_modules/kuromoji "$STANDALONE/node_modules/kuromoji"
ln -sf /opt/storyteller/.env "$WEB_DIR/.env"
msg_ok "Built Storyteller"
msg_info "Updating Whisper"
WHISPER_VARIANT="linux-$(arch_resolve "x64" "arm64")-cpu"
$STD node /opt/storyteller/libraries/ghost-story/dist/cli/bin.js install binary "$WHISPER_VARIANT"
$STD node /opt/storyteller/libraries/ghost-story/dist/cli/bin.js install model tiny.en
if [[ "$WHISPER_VARIANT" == "linux-x64-cpu" ]]; then
$STD node /opt/storyteller/libraries/ghost-story/dist/cli/bin.js install binary linux-x64-cpu-legacy
fi
mkdir -p /opt/storyteller/web/.next/standalone/web/migrations
cp -rT /opt/storyteller/web/migrations /opt/storyteller/web/.next/standalone/web/migrations
mkdir -p /opt/storyteller/web/.next/standalone/web/sqlite
cp -rT /opt/storyteller/web/sqlite /opt/storyteller/web/.next/standalone/web/sqlite
ln -sf /opt/storyteller/.env /opt/storyteller/web/.next/standalone/web/.env
msg_ok "Rebuilt Storyteller"
msg_ok "Updated Whisper"
cat <<EOF >/etc/systemd/system/storyteller.service
[Unit]
Description=Storyteller
After=network.target
[Service]
Type=simple
User=root
WorkingDirectory=${WEB_DIR}
EnvironmentFile=/opt/storyteller/.env
Environment=SQLITE_NATIVE_BINDING=${STANDALONE}/node_modules/better-sqlite3/build/Release/better_sqlite3.node
Environment=ERROR_ALIGN_NATIVE_BINDING=${WEB_DIR}/work-dist/@storyteller-platform/align/
Environment=STORYTELLER_WORKER=worker.mjs
Environment=STORYTELLER_FILE_WRITE_WORKER=fileWriteWorker.mjs
ExecStart=/usr/bin/node --enable-source-maps server.js
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
msg_info "Starting Service"
systemctl start storyteller
@@ -75,7 +108,6 @@ function update_script() {
fi
exit
}
start
build_container
description
+25 -13
View File
@@ -46,24 +46,36 @@ function update_script() {
msg_warn "No Zabbix Agent service found, skipping agent actions"
fi
ZABBIX_SERIES="$(dpkg-query -W -f='${Version}' zabbix-release 2>/dev/null || true)"
ZABBIX_SERIES="${ZABBIX_SERIES#*:}"
ZABBIX_SERIES="${ZABBIX_SERIES%%[!0-9.]*}"
if [[ "${PHS_SILENT:-0}" == "1" ]]; then
if [[ ! "$ZABBIX_SERIES" =~ ^[0-9]+\.[0-9]+$ ]]; then
msg_warn "Could not detect the installed Zabbix series - skipping update, requires an interactive run"
exit 75
fi
ZABBIX_VERSION="$ZABBIX_SERIES"
msg_warn "Unattended update: staying on Zabbix ${ZABBIX_VERSION}"
else
read -rp "Choose Zabbix version [1] 7.0 LTS [2] 7.4 (Latest Stable) [3] Latest available (default: 2): " ZABBIX_CHOICE
ZABBIX_CHOICE=${ZABBIX_CHOICE:-2}
case "$ZABBIX_CHOICE" in
1) ZABBIX_VERSION="7.0" ;;
2) ZABBIX_VERSION="7.4" ;;
3) ZABBIX_VERSION=$(curl -fsSL https://repo.zabbix.com/zabbix/ |
grep -oP '(?<=href=")[0-9]+\.[0-9]+(?=/")' | sort -V | tail -n1) ;;
*)
ZABBIX_VERSION="7.4"
echo "Invalid choice. Defaulting to 7.4."
;;
esac
fi
msg_info "Stopping Services"
systemctl stop zabbix-server
[[ -n "$AGENT_SERVICE" ]] && systemctl stop "$AGENT_SERVICE"
msg_ok "Stopped Services"
read -rp "Choose Zabbix version [1] 7.0 LTS [2] 7.4 (Latest Stable) [3] Latest available (default: 2): " ZABBIX_CHOICE
ZABBIX_CHOICE=${ZABBIX_CHOICE:-2}
case "$ZABBIX_CHOICE" in
1) ZABBIX_VERSION="7.0" ;;
2) ZABBIX_VERSION="7.4" ;;
3) ZABBIX_VERSION=$(curl -fsSL https://repo.zabbix.com/zabbix/ |
grep -oP '(?<=href=")[0-9]+\.[0-9]+(?=/")' | sort -V | tail -n1) ;;
*)
ZABBIX_VERSION="7.4"
echo "Invalid choice. Defaulting to 7.4."
;;
esac
msg_info "Updating Zabbix to $ZABBIX_VERSION"
mkdir -p /opt/zabbix-backup/
cp /etc/zabbix/zabbix_server.conf /opt/zabbix-backup/
+7 -3
View File
@@ -28,11 +28,15 @@ cd /opt/cryptpad
$STD npm ci --allow-git=all
$STD npm run install:components
if [[ "${onlyoffice,,}" =~ ^(y|yes)$ ]]; then
$STD bash -c "./install-onlyoffice.sh --accept-license"
$STD bash -c "./install-office.sh --accept-license"
fi
cp config/config.example.js config/config.js
sed -i "51s/localhost/${LOCAL_IP}/g" /opt/cryptpad/config/config.js
sed -i "80s#//httpAddress: 'localhost'#httpAddress: '0.0.0.0'#g" /opt/cryptpad/config/config.js
cp config/infra.example.js config/infra.js
sed -i \
-e "s|origin: \"http://localhost:3000\"|origin: \"http://${LOCAL_IP}:3000\"|" \
-e "s|sandboxOrigin: \"http://localhost:3001\"|sandboxOrigin: \"http://${LOCAL_IP}:3001\"|" \
-e "s|httpHost: \"localhost\"|httpHost: \"0.0.0.0\"|" \
config/infra.js
$STD npm run build
msg_ok "Setup CryptPad"
+1 -1
View File
@@ -13,7 +13,7 @@ setting_up_container
network_check
update_os
RELEASE="v3.3.4"
RELEASE="v3.3.5"
if lscpu | grep -q 'GenuineIntel'; then
echo ""
echo ""
+48 -32
View File
@@ -17,24 +17,55 @@ msg_info "Installing Dependencies"
$STD apt install -y \
build-essential \
git \
pkg-config \
libsqlite3-dev \
cmake \
sqlite3 \
python3-setuptools \
ffmpeg
libsqlite3-dev \
argon2 \
ffmpeg \
libcurl4t64 \
libxml2
msg_ok "Installed Dependencies"
NODE_VERSION="24" NODE_MODULE="corepack,yarn" setup_nodejs
NODE_VERSION="24" NODE_MODULE="corepack" setup_nodejs
fetch_and_deploy_gh_release "readium" "readium/cli" "prebuild" "latest" "/opt/readium" "readium_linux_$(arch_resolve "x86_64" "arm64").tar.gz"
fetch_and_deploy_gh_release "readium" "readium/cli" "prebuild" "v0.9.1" "/opt/readium" "readium_linux_$(arch_resolve "x86_64" "arm64").tar.gz"
ln -sf /opt/readium/readium /usr/local/bin/readium
fetch_and_deploy_gl_release "storyteller" "storyteller-platform/storyteller" "tarball" "latest" "/opt/storyteller" "" "web-v2"
msg_info "Setting up Storyteller"
msg_info "Building Storyteller (Patience)"
cd /opt/storyteller
$STD corepack yarn install
export NODE_ENV=production
export NEXT_TELEMETRY_DISABLED=1
export SQLITE_NATIVE_BINDING=/opt/storyteller/node_modules/better-sqlite3/build/Release/better_sqlite3.node
$STD corepack yarn workspaces foreach -Rpt --from @storyteller-platform/web --exclude @storyteller-platform/eslint run build
STANDALONE=/opt/storyteller/applications/web/.next/standalone
WEB_DIR="$STANDALONE/applications/web"
mkdir -p "$WEB_DIR"/{public,.next/static,.next/cache,migrations,sqlite,scripts}
cp -rT applications/web/public "$WEB_DIR/public"
cp -rT applications/web/.next/static "$WEB_DIR/.next/static"
cp -rT applications/web/migrations "$WEB_DIR/migrations"
cp applications/web/sqlite/uuid.c.so "$WEB_DIR/sqlite/"
cp docker-scripts/reset-password.sh "$WEB_DIR/scripts/"
cp -r applications/web/work-dist applications/web/file-write-dist "$WEB_DIR/"
mkdir -p "$WEB_DIR/work-dist/@storyteller-platform/align/prebuilds"
cp -r "libraries/align/prebuilds/linux-$(arch_resolve "x64" "arm64")" "$WEB_DIR/work-dist/@storyteller-platform/align/prebuilds/"
cp node_modules/@echogarden/icu-segmentation-wasm/wasm/*.wasm "$WEB_DIR/work-dist/"
cp -rT node_modules/@parcel "$STANDALONE/node_modules/@parcel"
cp -rT node_modules/kuromoji "$STANDALONE/node_modules/kuromoji"
msg_ok "Built Storyteller"
$STD corepack yarn install --network-timeout 600000
$STD gcc -g -fPIC -rdynamic -shared applications/web/sqlite/uuid.c -o applications/web/sqlite/uuid.c.so
msg_info "Installing Whisper"
WHISPER_VARIANT="linux-$(arch_resolve "x64" "arm64")-cpu"
$STD node /opt/storyteller/libraries/ghost-story/dist/cli/bin.js install binary "$WHISPER_VARIANT"
$STD node /opt/storyteller/libraries/ghost-story/dist/cli/bin.js install model tiny.en
if [[ "$WHISPER_VARIANT" == "linux-x64-cpu" ]]; then
$STD node /opt/storyteller/libraries/ghost-story/dist/cli/bin.js install binary linux-x64-cpu-legacy
fi
msg_ok "Installed Whisper"
msg_info "Configuring Storyteller"
mkdir -p /opt/storyteller/data
STORYTELLER_SECRET_KEY=$(openssl rand -base64 32)
cat <<EOF >/opt/storyteller/.env
STORYTELLER_SECRET_KEY=${STORYTELLER_SECRET_KEY}
@@ -45,33 +76,14 @@ READIUM_PORT=9000
NODE_ENV=production
NEXT_TELEMETRY_DISABLED=1
EOF
mkdir -p /opt/storyteller/data
chmod 600 /opt/storyteller/.env
ln -sf /opt/storyteller/.env "$WEB_DIR/.env"
cat <<EOF >~/storyteller.creds
Storyteller Credentials
=======================
Secret Key: ${STORYTELLER_SECRET_KEY}
EOF
msg_ok "Set up Storyteller"
msg_info "Building Storyteller"
cd /opt/storyteller
export CI=1
export NODE_ENV=production
export NEXT_TELEMETRY_DISABLED=1
export SQLITE_NATIVE_BINDING=/opt/storyteller/node_modules/better-sqlite3/build/Release/better_sqlite3.node
$STD corepack yarn workspaces foreach -Rpt --from @storyteller-platform/web --exclude @storyteller-platform/eslint run build
mkdir -p /opt/storyteller/applications/web/.next/standalone/applications/web/.next/static
cp -rT /opt/storyteller/applications/web/.next/static /opt/storyteller/applications/web/.next/standalone/applications/web/.next/static
if [[ -d /opt/storyteller/applications/web/public ]]; then
mkdir -p /opt/storyteller/applications/web/.next/standalone/applications/web/public
cp -rT /opt/storyteller/applications/web/public /opt/storyteller/applications/web/.next/standalone/applications/web/public
fi
mkdir -p /opt/storyteller/applications/web/.next/standalone/applications/web/migrations
cp -rT /opt/storyteller/applications/web/migrations /opt/storyteller/applications/web/.next/standalone/applications/web/migrations
mkdir -p /opt/storyteller/applications/web/.next/standalone/applications/web/sqlite
cp -rT /opt/storyteller/applications/web/sqlite /opt/storyteller/applications/web/.next/standalone/applications/web/sqlite
ln -sf /opt/storyteller/.env /opt/storyteller/applications/web/.next/standalone/applications/web/.env
msg_ok "Built Storyteller"
msg_ok "Configured Storyteller"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/storyteller.service
@@ -82,8 +94,12 @@ After=network.target
[Service]
Type=simple
User=root
WorkingDirectory=/opt/storyteller/applications/web/.next/standalone/applications/web
WorkingDirectory=${WEB_DIR}
EnvironmentFile=/opt/storyteller/.env
Environment=SQLITE_NATIVE_BINDING=${STANDALONE}/node_modules/better-sqlite3/build/Release/better_sqlite3.node
Environment=ERROR_ALIGN_NATIVE_BINDING=${WEB_DIR}/work-dist/@storyteller-platform/align/
Environment=STORYTELLER_WORKER=worker.mjs
Environment=STORYTELLER_FILE_WRITE_WORKER=fileWriteWorker.mjs
ExecStart=/usr/bin/node --enable-source-maps server.js
Restart=on-failure
RestartSec=5