diff --git a/ct/trip.sh b/ct/trip.sh index b06aa1b86..d166e6009 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" @@ -49,14 +49,14 @@ function update_script() { msg_info "Updating Backend" cd /opt/trip/backend - $STD /opt/trip/.venv/bin/pip install --no-cache-dir -r trip/requirements.txt + $STD uv pip install --python /opt/trip/.venv/bin/python -r trip/requirements.txt 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..5169b0852 100644 --- a/frontend/public/json/trip.json +++ b/frontend/public/json/trip.json @@ -1,35 +1,35 @@ { - "name": "TRIP", - "slug": "trip", - "categories": [ - 21 - ], - "date_created": "2026-01-16", - "type": "ct", - "updateable": true, - "privileged": false, - "interface_port": 8000, - "documentation": "https://github.com/itskovacs/TRIP", - "website": "https://github.com/itskovacs/TRIP", - "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/trip.webp", - "config_path": "/opt/trip/.env", - "description": "Minimalist POI Map Tracker and Trip Planner. Self-hosted.", - "install_methods": [ - { - "type": "default", - "script": "ct/trip.sh", - "resources": { - "cpu": 1, - "ram": 1024, - "hdd": 4, - "os": "debian", - "version": "13" - } - } - ], - "default_credentials": { - "username": null, - "password": null - }, - "notes": [] + "name": "TRIP", + "slug": "trip", + "categories": [ + 21 + ], + "date_created": "2026-01-16", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 8000, + "documentation": "https://itskovacs.github.io/trip/docs/intro", + "website": "https://github.com/itskovacs/TRIP", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/trip.webp", + "config_path": "/opt/trip.env", + "description": "Minimalist POI Map Tracker and Trip Planner. Self-hosted.", + "install_methods": [ + { + "type": "default", + "script": "ct/trip.sh", + "resources": { + "cpu": 1, + "ram": 1024, + "hdd": 4, + "os": "debian", + "version": "13" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] } diff --git a/install/trip-install.sh b/install/trip-install.sh index b4d2f8acf..d95728327 100644 --- a/install/trip-install.sh +++ b/install/trip-install.sh @@ -31,13 +31,23 @@ msg_ok "Built Frontend" msg_info "Setting up Backend" cd /opt/trip/backend $STD uv venv /opt/trip/.venv -$STD /opt/trip/.venv/bin/pip install --no-cache-dir -r trip/requirements.txt +$STD uv pip install --python /opt/trip/.venv/bin/python -r trip/requirements.txt 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