Compare commits

..
Author SHA1 Message Date
Rögl-Brunner Michel 357c4ae119 speedtest-tracker: install cron for the scheduler
The install script writes /etc/cron.d/speedtest-tracker but never installed cron, so SPEEDTEST_SCHEDULE never ran on Debian 13. Add cron to the install dependencies and ensure it on update for existing containers.
2026-11-30 13:16:28 +01:00
4 changed files with 14 additions and 66 deletions

No files matched your search

+6 -38
View File
@@ -31,41 +31,12 @@ function update_script() {
exit
fi
if [[ ! -f /etc/systemd/system/kan-api.service ]]; then
msg_info "Creating API Service"
cat <<EOF >/etc/systemd/system/kan-api.service
[Unit]
Description=Kan API
After=network.target postgresql.service
Requires=postgresql.service
[Service]
Type=simple
User=root
WorkingDirectory=/opt/kan/apps/api/dist
EnvironmentFile=/opt/kan/.env
ExecStart=/usr/bin/node main.mjs
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
if [[ -f /opt/kan/apps/api/build.mjs ]]; then
cd /opt/kan/apps/api
$STD node build.mjs
systemctl enable -q --now kan-api
fi
msg_ok "Created API Service"
fi
if check_for_gh_tag "kan" "kanbn/kan"; then
NODE_VERSION="24" NODE_MODULE="pnpm" setup_nodejs
msg_info "Stopping Services"
systemctl stop kan kan-api
msg_ok "Stopped Services"
msg_info "Stopping Service"
systemctl stop kan
msg_ok "Stopped Service"
create_backup /opt/kan/.env
CLEAN_INSTALL=1 fetch_and_deploy_gh_tag "kan" "kanbn/kan" "latest"
@@ -79,8 +50,6 @@ EOF
export CI=true
find /opt/kan/packages /opt/kan/apps -name 'tsconfig.json' -exec sed -i 's|"@kan/tsconfig/|"../../tooling/typescript/|g' {} +
$STD pnpm build --filter=@kan/web
cd /opt/kan/apps/api
$STD node build.mjs
unset NEXT_PUBLIC_USE_STANDALONE_OUTPUT CI
msg_ok "Built Application"
@@ -95,10 +64,9 @@ EOF
$STD pnpm exec drizzle-kit migrate
msg_ok "Ran Database Migrations"
msg_info "Starting Services"
systemctl enable -q --now kan-api
msg_info "Starting Service"
systemctl start kan
msg_ok "Started Services"
msg_ok "Started Service"
msg_ok "Updated successfully!"
fi
exit
+2
View File
@@ -31,6 +31,8 @@ function update_script() {
exit
fi
ensure_dependencies cron
if check_for_gh_release "speedtest-tracker" "alexjustesen/speedtest-tracker"; then
PHP_VERSION="8.4" PHP_FPM="YES" setup_php
setup_composer
+5 -28
View File
@@ -34,11 +34,9 @@ BETTER_AUTH_TRUSTED_ORIGINS=http://${LOCAL_IP}:3000
POSTGRES_URL=postgres://${PG_DB_USER}:${PG_DB_PASS}@localhost:5432/${PG_DB_NAME}
NEXT_PUBLIC_ALLOW_CREDENTIALS=true
TRELLO_APP_API_KEY=
TRELLO_APP_SECRET=
TRELLO_APP_API_SECRET=
HOSTNAME=0.0.0.0
PORT=3000
API_PORT=4000
KAN_API_URL=http://127.0.0.1:4000
NODE_ENV=production
EOF
msg_ok "Configured Application"
@@ -51,8 +49,6 @@ $STD pnpm install --ignore-scripts --prod=false
export CI=true
find /opt/kan/packages /opt/kan/apps -name 'tsconfig.json' -exec sed -i 's|"@kan/tsconfig/|"../../tooling/typescript/|g' {} +
$STD pnpm build --filter=@kan/web
cd /opt/kan/apps/api
$STD node build.mjs
unset NEXT_PUBLIC_USE_STANDALONE_OUTPUT CI
msg_ok "Built Application"
@@ -67,31 +63,12 @@ cd /opt/kan/packages/db
POSTGRES_URL="postgres://${PG_DB_USER}:${PG_DB_PASS}@localhost:5432/${PG_DB_NAME}" $STD pnpm exec drizzle-kit migrate
msg_ok "Ran Database Migrations"
msg_info "Creating Services"
cat <<EOF >/etc/systemd/system/kan-api.service
[Unit]
Description=Kan API
After=network.target postgresql.service
Requires=postgresql.service
[Service]
Type=simple
User=root
WorkingDirectory=/opt/kan/apps/api/dist
EnvironmentFile=/opt/kan/.env
ExecStart=/usr/bin/node main.mjs
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/kan.service
[Unit]
Description=Kan Board
After=network.target postgresql.service kan-api.service
After=network.target postgresql.service
Requires=postgresql.service
Wants=kan-api.service
[Service]
Type=simple
@@ -105,8 +82,8 @@ RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now kan-api kan
msg_ok "Created Services"
systemctl enable -q --now kan
msg_ok "Created Service"
motd_ssh
customize
+1
View File
@@ -15,6 +15,7 @@ update_os
msg_info "Installing Dependencies"
$STD apt install -y \
cron \
nginx \
sqlite3
setcap cap_net_raw+ep /bin/ping