tracktor: bump to debian 13 | feature bump (#7818)

This commit is contained in:
Tobias 2025-09-23 10:46:03 +02:00 committed by GitHub
parent 42191bdb5a
commit 7cd3e40f9c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 21 additions and 18 deletions

View File

@ -11,7 +11,7 @@ var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-4096}" var_ram="${var_ram:-4096}"
var_disk="${var_disk:-6}" var_disk="${var_disk:-6}"
var_os="${var_os:-debian}" var_os="${var_os:-debian}"
var_version="${var_version:-12}" var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}" var_unprivileged="${var_unprivileged:-1}"
header_info "$APP" header_info "$APP"
@ -33,22 +33,23 @@ function update_script() {
systemctl stop tracktor systemctl stop tracktor
msg_ok "Stopped Service" msg_ok "Stopped Service"
msg_info "Creating Backup" msg_info "Correcting Services"
cp /opt/tracktor/app/backend/.env /opt/tracktor.env if [ -f /opt/tracktor/app/backend/.env ]; then
msg_ok "Created Backup" 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
msg_ok "Corrected Services"
setup_nodejs setup_nodejs
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "tracktor" "javedh-dev/tracktor" "tarball" "latest" "/opt/tracktor" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "tracktor" "javedh-dev/tracktor" "tarball" "latest" "/opt/tracktor"
msg_info "Updating ${APP}" msg_info "Updating tracktor"
cd /opt/tracktor cd /opt/tracktor
$STD npm install $STD npm install
$STD npm run build $STD npm run build
msg_ok "Updated $APP" msg_ok "Updated tracktor"
msg_info "Restoring Backup"
cp /opt/tracktor.env /opt/tracktor/app/backend/.env
msg_ok "Restored Backup"
msg_info "Starting Service" msg_info "Starting Service"
systemctl start tracktor systemctl start tracktor

View File

@ -10,7 +10,7 @@
"privileged": false, "privileged": false,
"interface_port": 3000, "interface_port": 3000,
"documentation": "https://tracktor.bytedge.in/introduction.html", "documentation": "https://tracktor.bytedge.in/introduction.html",
"config_path": "/opt/tracktor/app/server/.env", "config_path": "/opt/tracktor.env",
"website": "https://tracktor.bytedge.in/", "website": "https://tracktor.bytedge.in/",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/tracktor.webp", "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/tracktor.webp",
"description": "Tracktor is an open-source web application for comprehensive vehicle management.\nEasily track fuel consumption, maintenance, insurance, and regulatory documents for all your vehicles in one place.", "description": "Tracktor is an open-source web application for comprehensive vehicle management.\nEasily track fuel consumption, maintenance, insurance, and regulatory documents for all your vehicles in one place.",
@ -23,17 +23,17 @@
"ram": 1024, "ram": 1024,
"hdd": 6, "hdd": 6,
"os": "Debian", "os": "Debian",
"version": "12" "version": "13"
} }
} }
], ],
"default_credentials": { "default_credentials": {
"username": null, "username": null,
"password": null "password": "123456"
}, },
"notes": [ "notes": [
{ {
"text": "Please check and update the '/opt/tracktor/app/backend/.env' file if using behind reverse proxy.", "text": "Please check and update the '/opt/tracktor.env' file if using behind reverse proxy.",
"type": "info" "type": "info"
} }
] ]

View File

@ -22,7 +22,7 @@ $STD npm install
$STD npm run build $STD npm run build
mkdir /opt/tracktor-data mkdir /opt/tracktor-data
HOST_IP=$(hostname -I | awk '{print $1}') HOST_IP=$(hostname -I | awk '{print $1}')
cat <<EOF >/opt/tracktor/app/backend/.env cat <<EOF >/opt/tracktor.env
NODE_ENV=production NODE_ENV=production
PUBLIC_DEMO_MODE=false PUBLIC_DEMO_MODE=false
DB_PATH=/opt/tracktor-data/tracktor.db DB_PATH=/opt/tracktor-data/tracktor.db
@ -31,6 +31,7 @@ PUBLIC_API_BASE_URL=http://$HOST_IP:3000
# Here add the reverse proxy url as well to avoid cross errors from the app. # Here add the reverse proxy url as well to avoid cross errors from the app.
CORS_ORIGINS=http://$HOST_IP:3000 CORS_ORIGINS=http://$HOST_IP:3000
PORT=3000 PORT=3000
AUTH_PIN=123456
EOF EOF
msg_ok "Configured Tracktor" msg_ok "Configured Tracktor"
@ -43,7 +44,7 @@ After=network.target
[Service] [Service]
Type=simple Type=simple
WorkingDirectory=/opt/tracktor WorkingDirectory=/opt/tracktor
EnvironmentFile=/opt/tracktor/app/backend/.env EnvironmentFile=/opt/tracktor.env
ExecStart=/usr/bin/npm start ExecStart=/usr/bin/npm start
[Install] [Install]
@ -56,6 +57,7 @@ motd_ssh
customize customize
msg_info "Cleaning up" msg_info "Cleaning up"
$STD apt-get -y autoremove $STD apt -y autoremove
$STD apt-get -y autoclean $STD apt -y autoclean
$STD apt -y clean
msg_ok "Cleaned" msg_ok "Cleaned"