mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-03-31 02:54:09 +02:00
Co-authored-by: alexbelgium <44178713+alexbelgium@users.noreply.github.com> Agent-Logs-Url: https://github.com/alexbelgium/hassio-addons/sessions/c45f9e34-4233-4929-96c9-50c7db39ac6d
16 lines
537 B
Plaintext
Executable File
16 lines
537 B
Plaintext
Executable File
#!/usr/bin/with-contenv bashio
|
|
# shellcheck shell=bash
|
|
set -e
|
|
|
|
cd /app || exit 1
|
|
|
|
# Set Node.js memory limit from addon option to prevent OOM kills
|
|
# NODE_MEMORY_LIMIT is exported as env var by 00-global_var.sh from config.yaml
|
|
MEMORY_LIMIT="${NODE_MEMORY_LIMIT:-512}"
|
|
if [[ "${NODE_OPTIONS:-}" != *"max-old-space-size"* ]] && [[ "${NODE_OPTIONS:-}" != *"max_old_space_size"* ]]; then
|
|
export NODE_OPTIONS="${NODE_OPTIONS:+${NODE_OPTIONS} }--max-old-space-size=${MEMORY_LIMIT}"
|
|
fi
|
|
|
|
bashio::log.info "Starting Seerr..."
|
|
exec npm start
|