mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-08-20 19:42:42 +02:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 695cd75026 |
@@ -34,7 +34,7 @@ msg_info "Setting up Storyteller"
|
||||
cd /opt/storyteller
|
||||
|
||||
$STD corepack yarn install --network-timeout 600000
|
||||
$STD gcc -g -fPIC -rdynamic -shared web/sqlite/uuid.c -o web/sqlite/uuid.c.so
|
||||
$STD gcc -g -fPIC -rdynamic -shared applications/web/sqlite/uuid.c -o applications/web/sqlite/uuid.c.so
|
||||
STORYTELLER_SECRET_KEY=$(openssl rand -base64 32)
|
||||
cat <<EOF >/opt/storyteller/.env
|
||||
STORYTELLER_SECRET_KEY=${STORYTELLER_SECRET_KEY}
|
||||
@@ -60,17 +60,17 @@ 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
|
||||
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/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
|
||||
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_info "Creating Service"
|
||||
@@ -82,7 +82,7 @@ After=network.target
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/storyteller/web/.next/standalone/web
|
||||
WorkingDirectory=/opt/storyteller/applications/web/.next/standalone/applications/web
|
||||
EnvironmentFile=/opt/storyteller/.env
|
||||
ExecStart=/usr/bin/node --enable-source-maps server.js
|
||||
Restart=on-failure
|
||||
|
||||
@@ -38,6 +38,7 @@ LOG_PATH="/var/log/copyparty"
|
||||
DATA_PATH="/var/lib/copyparty"
|
||||
SVC_USER="copyparty"
|
||||
SVC_GROUP="copyparty"
|
||||
SRC_URL="https://github.com/9001/copyparty/releases/latest/download/copyparty-sfx.py"
|
||||
DEFAULT_PORT=3923
|
||||
|
||||
# ==============================================================================
|
||||
@@ -114,8 +115,11 @@ function update() {
|
||||
fi
|
||||
msg_ok "Stopped service"
|
||||
|
||||
USE_ORIGINAL_FILENAME=true fetch_and_deploy_gh_release "copyparty-sfx.py" "9001/copyparty" "singlefile" "latest" "/usr/local/bin" "copyparty-sfx.py"
|
||||
msg_info "Updating ${APP}"
|
||||
curl -fsSL "$SRC_URL" -o "$BIN_PATH"
|
||||
chmod +x "$BIN_PATH"
|
||||
chown "$SVC_USER:$SVC_GROUP" "$BIN_PATH"
|
||||
msg_ok "Updated ${APP}"
|
||||
|
||||
msg_info "Starting service"
|
||||
if [[ "$OS" == "Alpine" ]]; then
|
||||
@@ -182,8 +186,11 @@ function install() {
|
||||
chown "$SVC_USER:$SVC_GROUP" "$DATA_PATH"
|
||||
fi
|
||||
|
||||
USE_ORIGINAL_FILENAME=true fetch_and_deploy_gh_release "copyparty-sfx.py" "9001/copyparty" "singlefile" "latest" "/usr/local/bin" "copyparty-sfx.py"
|
||||
msg_info "Downloading ${APP}"
|
||||
curl -fsSL "$SRC_URL" -o "$BIN_PATH"
|
||||
chmod +x "$BIN_PATH"
|
||||
chown "$SVC_USER:$SVC_GROUP" "$BIN_PATH"
|
||||
msg_ok "Downloaded to ${BIN_PATH}"
|
||||
|
||||
msg_info "Creating configuration"
|
||||
cat <<EOF >"$CONF_PATH"
|
||||
|
||||
Reference in New Issue
Block a user