From 4f2c7076052f174deffdabfbe63abab87d016c5c Mon Sep 17 00:00:00 2001 From: Javed Hussain Date: Wed, 17 Dec 2025 19:31:28 +0530 Subject: [PATCH] Tracktor: updated environment variables for latest release (#10067) * Updated environemnt variables for latest release * refactor * write clean config --------- Co-authored-by: Javed Hussain Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com> --- ct/tracktor.sh | 45 +++++++++++++++++++------------------ install/tracktor-install.sh | 32 ++++++++++++++------------ 2 files changed, 41 insertions(+), 36 deletions(-) diff --git a/ct/tracktor.sh b/ct/tracktor.sh index 5932161d3..e6402de46 100644 --- a/ct/tracktor.sh +++ b/ct/tracktor.sh @@ -34,38 +34,39 @@ function update_script() { msg_ok "Stopped Service" msg_info "Correcting Services" - if [ -f /opt/tracktor/app/backend/.env ]; then - mv /opt/tracktor/app/backend/.env /opt/tracktor.env - echo 'AUTH_PIN=123456' >>/opt/tracktor.env - sed -i 's|^EnvironmentFile=.*|EnvironmentFile=/opt/tracktor.env|' /etc/systemd/system/tracktor.service - systemctl daemon-reload - fi if [ ! -d "/opt/tracktor-data/uploads" ]; then mkdir -p /opt/tracktor-data/{uploads,logs} - EXISTING_AUTH_PIN=$(grep '^AUTH_PIN=' /opt/tracktor.env 2>/dev/null | cut -d'=' -f2) - AUTH_PIN=${EXISTING_AUTH_PIN:-123456} - cat </opt/tracktor.env + fi + if ! grep -qxF 'BODY_SIZE_LIMIT=Infinity' /opt/tracktor.env; then + rm /opt/tracktor.env + cat </opt/tracktor.env +cat </opt/tracktor.env NODE_ENV=production +# Set this to the path of the database file. Default - ./tracktor.db DB_PATH=/opt/tracktor-data/tracktor.db +# Set this to the path of the uploads directory. Default - ./uploads UPLOADS_DIR="/opt/tracktor-data/uploads" +# Set this to the path of the logs directory. Default - ./logs LOG_DIR="/opt/tracktor-data/logs" -# If server host is not set by default it will run on all interfaces - 0.0.0.0 -# SERVER_HOST="" -SERVER_PORT=3000 -# Set this if you want to secure your endpoints otherwise default will be "*" -CORS_ORIGINS="*" -# Set this if you are using backend and frontend separately. -# PUBLIC_API_BASE_URL="" -LOG_REQUESTS=true -LOG_LEVEL="info" -AUTH_PIN=${AUTH_PIN} -# PUBLIC_DEMO_MODE=false -# FORCE_DATA_SEED=false +# Hostname to bind the server to. Default - 0.0.0.0 +#HOST="0.0.0.0" +# Port to bind the server to. Default - 3000 +#PORT=3000 +# Set this to remove upload size limitations. Default - 512 Kb +BODY_SIZE_LIMIT=Infinity +# Enable request logging. Default - true +#LOG_REQUESTS=true +# Set the logging level. Options - error, warn, info, verbose, debug, silly. Default - info +#LOG_LEVEL="info" +# Enable demo mode. Default - false +#TRACKTOR_DEMO_MODE=false +# Force reseeding of data on every startup. Default - false +#FORCE_DATA_SEED=false EOF fi msg_ok "Corrected Services" - NODE_VERSION="22" setup_nodejs + NODE_VERSION="24" setup_nodejs CLEAN_INSTALL=1 fetch_and_deploy_gh_release "tracktor" "javedh-dev/tracktor" "tarball" "latest" "/opt/tracktor" msg_info "Updating tracktor" diff --git a/install/tracktor-install.sh b/install/tracktor-install.sh index 2c0f457f7..9832e13e5 100644 --- a/install/tracktor-install.sh +++ b/install/tracktor-install.sh @@ -13,7 +13,7 @@ setting_up_container network_check update_os -NODE_VERSION="22" setup_nodejs +NODE_VERSION="24" setup_nodejs fetch_and_deploy_gh_release "tracktor" "javedh-dev/tracktor" "tarball" "latest" "/opt/tracktor" msg_info "Configuring Tracktor" @@ -23,22 +23,26 @@ $STD npm run build mkdir -p /opt/tracktor-data/{uploads,logs} cat </opt/tracktor.env NODE_ENV=production +# Set this to the path of the database file. Default - ./tracktor.db DB_PATH=/opt/tracktor-data/tracktor.db +# Set this to the path of the uploads directory. Default - ./uploads UPLOADS_DIR="/opt/tracktor-data/uploads" +# Set this to the path of the logs directory. Default - ./logs LOG_DIR="/opt/tracktor-data/logs" -# If server host is not set by default it will run on all interfaces - 0.0.0.0 -# SERVER_HOST="" -SERVER_PORT=3000 -PORT=3000 -# Set this if you want to secure your endpoints otherwise default will be "*" -# CORS_ORIGINS="*" -# Set this if you are using backend and frontend separately. For lxc installation this is not needed -# PUBLIC_API_BASE_URL="" -LOG_REQUESTS=true -LOG_LEVEL="info" -AUTH_PIN=123456 -# PUBLIC_DEMO_MODE=false -# FORCE_DATA_SEED=false +# Hostname to bind the server to. Default - 0.0.0.0 +#HOST="0.0.0.0" +# Port to bind the server to. Default - 3000 +#PORT=3000 +# Set this to remove upload size limitations. Default - 512 Kb +BODY_SIZE_LIMIT=Infinity +# Enable request logging. Default - true +#LOG_REQUESTS=true +# Set the logging level. Options - error, warn, info, verbose, debug, silly. Default - info +#LOG_LEVEL="info" +# Enable demo mode. Default - false +#TRACKTOR_DEMO_MODE=false +# Force reseeding of data on every startup. Default - false +#FORCE_DATA_SEED=false EOF msg_ok "Configured Tracktor"