From 5adf52eacf582c51e56e2a5923d5e6f7a9a5e6cd Mon Sep 17 00:00:00 2001 From: CrazyWolf13 Date: Fri, 16 Jan 2026 14:25:25 +0100 Subject: [PATCH] trip --- ct/trip.sh | 10 +++++----- frontend/public/json/trip.json | 4 ++-- install/trip-install.sh | 14 ++++++++++++-- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/ct/trip.sh b/ct/trip.sh index b06aa1b86..dc0e07a85 100644 --- a/ct/trip.sh +++ b/ct/trip.sh @@ -34,8 +34,8 @@ function update_script() { msg_ok "Stopped Service" msg_info "Backing up Configuration" - cp -r /opt/trip/.env /opt/trip.env.bak 2>/dev/null || true - cp -r /opt/trip/data /opt/trip_data_backup 2>/dev/null || true + cp /opt/trip.env /opt/trip.env.bak + cp -r /opt/trip_storage /opt/trip_storage_backup msg_ok "Backed up Configuration" fetch_and_deploy_gh_release "trip" "itskovacs/TRIP" @@ -53,10 +53,10 @@ function update_script() { msg_ok "Updated Backend" msg_info "Restoring Configuration" - cp /opt/trip.env.bak /opt/trip/.env 2>/dev/null || true - cp -r /opt/trip_data_backup/. /opt/trip/data 2>/dev/null || true + cp /opt/trip.env.bak /opt/trip.env + cp -r /opt/trip_storage_backup/. /opt/trip_storage rm -f /opt/trip.env.bak - rm -rf /opt/trip_data_backup + rm -rf /opt/trip_storage_backup msg_ok "Restored Configuration" msg_info "Starting Service" diff --git a/frontend/public/json/trip.json b/frontend/public/json/trip.json index 1b28a5d9f..30f7dfa82 100644 --- a/frontend/public/json/trip.json +++ b/frontend/public/json/trip.json @@ -9,10 +9,10 @@ "updateable": true, "privileged": false, "interface_port": 8000, - "documentation": "https://github.com/itskovacs/TRIP", + "documentation": "https://itskovacs.github.io/trip/docs/getting-started/configuration/", "website": "https://github.com/itskovacs/TRIP", "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/trip.webp", - "config_path": "/opt/trip/.env", + "config_path": "/opt/trip.env", "description": "Minimalist POI Map Tracker and Trip Planner. Self-hosted.", "install_methods": [ { diff --git a/install/trip-install.sh b/install/trip-install.sh index b4d2f8acf..279f9b1ae 100644 --- a/install/trip-install.sh +++ b/install/trip-install.sh @@ -37,7 +37,17 @@ msg_ok "Set up Backend" msg_info "Configuring Application" mkdir -p /opt/trip/frontend cp -r /opt/trip/src/dist/trip/browser/* /opt/trip/frontend/ -mkdir -p /opt/trip/data +mkdir -p /opt/trip_storage/{attachments,backups,assets} + +cat </opt/trip.env +# TRIP Configuration +# https://itskovacs.github.io/trip/docs/getting-started/configuration/ +ATTACHMENTS_FOLDER=/opt/trip_storage/attachments +BACKUPS_FOLDER=/opt/trip_storage/backups +ASSETS_FOLDER=/opt/trip_storage/assets +FRONTEND_FOLDER=/opt/trip/frontend +SQLITE_FILE=/opt/trip_storage/trip.sqlite +EOF msg_ok "Configured Application" msg_info "Creating Service" @@ -49,7 +59,7 @@ After=network.target [Service] Type=simple WorkingDirectory=/opt/trip/backend -Environment="PYTHONPATH=/opt/trip/backend" +EnvironmentFile=/opt/trip.env ExecStart=/opt/trip/.venv/bin/fastapi run /opt/trip/backend/trip/main.py --host 0.0.0.0 --port 8000 Restart=on-failure RestartSec=5