Delete trek (ct) after migration to ProxmoxVE (#1747)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
b2dc432ff3
commit
ec8bd46436
@@ -1,6 +0,0 @@
|
||||
__________ ________ __
|
||||
/_ __/ __ \/ ____/ //_/
|
||||
/ / / /_/ / __/ / ,<
|
||||
/ / / _, _/ /___/ /| |
|
||||
/_/ /_/ |_/_____/_/ |_|
|
||||
|
||||
82
ct/trek.sh
82
ct/trek.sh
@@ -1,82 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||
# Source: https://github.com/mauriceboe/TREK
|
||||
|
||||
APP="TREK"
|
||||
var_tags="${var_tags:-travel;planning;collaboration}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-2048}"
|
||||
var_disk="${var_disk:-8}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -d /opt/trek ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "trek" "mauriceboe/TREK"; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop trek
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
msg_info "Backing up Data"
|
||||
cp /opt/trek/server/.env /opt/trek.env.bak
|
||||
mv /opt/trek/data /opt/trek-data.bak
|
||||
mv /opt/trek/uploads /opt/trek-uploads.bak
|
||||
msg_ok "Backed up Data"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "trek" "mauriceboe/TREK" "tarball"
|
||||
|
||||
msg_info "Building Client"
|
||||
cd /opt/trek/client
|
||||
$STD npm ci
|
||||
$STD npm run build
|
||||
mkdir -p /opt/trek/server/public
|
||||
cp -r /opt/trek/client/dist/* /opt/trek/server/public/
|
||||
cp -r /opt/trek/client/public/fonts /opt/trek/server/public/fonts 2>/dev/null || true
|
||||
msg_ok "Built Client"
|
||||
|
||||
msg_info "Installing Server Dependencies"
|
||||
cd /opt/trek/server
|
||||
$STD npm ci
|
||||
msg_ok "Installed Server Dependencies"
|
||||
|
||||
mv /opt/trek-data.bak /opt/trek/data
|
||||
mv /opt/trek-uploads.bak /opt/trek/uploads
|
||||
rm -rf /opt/trek/server/data /opt/trek/server/uploads
|
||||
ln -s /opt/trek/data /opt/trek/server/data
|
||||
ln -s /opt/trek/uploads /opt/trek/server/uploads
|
||||
cp /opt/trek.env.bak /opt/trek/server/.env
|
||||
rm -f /opt/trek.env.bak
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start trek
|
||||
msg_ok "Started Service"
|
||||
msg_ok "Updated ${APP}"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"
|
||||
@@ -1,98 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||
# Source: https://github.com/mauriceboe/TREK
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y build-essential
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
|
||||
fetch_and_deploy_gh_release "trek" "mauriceboe/TREK" "tarball"
|
||||
|
||||
msg_info "Building Client"
|
||||
cd /opt/trek/client
|
||||
$STD npm ci
|
||||
$STD npm run build
|
||||
msg_ok "Built Client"
|
||||
|
||||
msg_info "Setting up Server"
|
||||
cd /opt/trek/server
|
||||
$STD npm ci
|
||||
mkdir -p /opt/trek/server/public
|
||||
cp -r /opt/trek/client/dist/* /opt/trek/server/public/
|
||||
cp -r /opt/trek/client/public/fonts /opt/trek/server/public/fonts 2>/dev/null || true
|
||||
mkdir -p /opt/trek/{data/logs,uploads/{files,covers,avatars,photos}}
|
||||
rm -rf /opt/trek/server/data /opt/trek/server/uploads
|
||||
ln -s /opt/trek/data /opt/trek/server/data
|
||||
ln -s /opt/trek/uploads /opt/trek/server/uploads
|
||||
ENCRYPTION_KEY=$(openssl rand -hex 32)
|
||||
ADMIN_EMAIL="admin@trek.local"
|
||||
ADMIN_PASSWORD=$(openssl rand -base64 18 | tr -dc 'A-Za-z0-9' | head -c 16)
|
||||
cat <<EOF >/opt/trek/server/.env
|
||||
NODE_ENV=production
|
||||
PORT=3000
|
||||
ENCRYPTION_KEY=${ENCRYPTION_KEY}
|
||||
ADMIN_EMAIL=${ADMIN_EMAIL}
|
||||
ADMIN_PASSWORD=${ADMIN_PASSWORD}
|
||||
COOKIE_SECURE=false
|
||||
FORCE_HTTPS=false
|
||||
LOG_LEVEL=info
|
||||
TZ=UTC
|
||||
EOF
|
||||
chmod 600 /opt/trek/server/.env
|
||||
msg_ok "Set up Server"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/trek.service
|
||||
[Unit]
|
||||
Description=TREK Travel Planner
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/trek/server
|
||||
EnvironmentFile=/opt/trek/server/.env
|
||||
ExecStart=/usr/bin/node --import tsx src/index.ts
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now trek
|
||||
msg_ok "Created Service"
|
||||
|
||||
msg_info "Waiting for TREK to initialize"
|
||||
for i in $(seq 1 30); do
|
||||
if curl -sf http://localhost:3000/api/health >/dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
if ! curl -sf http://localhost:3000/api/health >/dev/null 2>&1; then
|
||||
msg_error "TREK failed to initialize"
|
||||
exit
|
||||
fi
|
||||
sed -i '/^ADMIN_EMAIL=/d;/^ADMIN_PASSWORD=/d' /opt/trek/server/.env
|
||||
msg_ok "TREK initialized"
|
||||
|
||||
echo -e "${INFO}${YW} Default Admin Account:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}Email: ${ADMIN_EMAIL}${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}Password: ${ADMIN_PASSWORD}${CL}"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -1,48 +0,0 @@
|
||||
{
|
||||
"name": "TREK",
|
||||
"slug": "trek",
|
||||
"categories": [
|
||||
0
|
||||
],
|
||||
"date_created": "2026-04-02",
|
||||
"type": "ct",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 3000,
|
||||
"documentation": "https://github.com/mauriceboe/TREK#readme",
|
||||
"website": "https://github.com/mauriceboe/TREK",
|
||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/trek.webp",
|
||||
"description": "TREK is a self-hosted, real-time collaborative travel planner with interactive maps, budgets, packing lists, weather forecasts, PWA support, and multi-user collaboration via WebSocket.",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "ct/trek.sh",
|
||||
"config_path": "/opt/trek/server/.env",
|
||||
"resources": {
|
||||
"cpu": 2,
|
||||
"ram": 2048,
|
||||
"hdd": 8,
|
||||
"os": "Debian",
|
||||
"version": "13"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": "admin@trek.local",
|
||||
"password": null
|
||||
},
|
||||
"notes": [
|
||||
{
|
||||
"text": "A default admin account is seeded during setup with the email admin@trek.local.",
|
||||
"type": "info"
|
||||
},
|
||||
{
|
||||
"text": "ENCRYPTION_KEY is auto-generated during setup and stored in `/opt/trek/server/.env`.",
|
||||
"type": "info"
|
||||
},
|
||||
{
|
||||
"text": "Set APP_URL in `/opt/trek/server/.env` if you plan to use OIDC or email-based features.",
|
||||
"type": "info"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user