Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/deploy-droplet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,18 @@ jobs:
sudo systemctl restart bittorrented || echo "Warning: Could not restart main service"
echo "✓ Main service restart attempted"

sudo systemctl reset-failed bittorrented-iptv-worker || true
sudo systemctl restart bittorrented-iptv-worker || echo "Warning: Could not restart IPTV worker"
echo "✓ IPTV worker restart attempted"


# The podcast worker is a long-running process that is NOT recreated by
# `next start`; if it crash-loops (e.g. the mise/pnpm path drift) it hits
# systemd's start limiter and stays `failed` forever because nothing here
# restarts it. Reset the limiter and restart it on every deploy.
sudo systemctl reset-failed bittorrented-podcast-worker || true
sudo systemctl restart bittorrented-podcast-worker || echo "Warning: Could not restart podcast worker"
echo "✓ Podcast worker restart attempted"

echo ""
echo "=== Verifying deployment ==="
# Give the unit a moment to either become active or crash so the
Expand All @@ -212,6 +221,7 @@ jobs:
echo "failed" > "$STATUS_FILE"; exit 1
fi
systemctl is-active bittorrented-iptv-worker || echo "IPTV worker status unknown"
systemctl is-active bittorrented-podcast-worker || echo "Podcast worker status unknown"

echo "Waiting for HTTP health check..."
HEALTH_OK=false
Expand Down
3 changes: 3 additions & 0 deletions scripts/setup-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -933,6 +933,9 @@ WorkingDirectory=${DEPLOY_PATH}
ExecStart=/bin/bash -c 'set -a; source ${DEPLOY_PATH}/.env; set +a; exec ${PNPM_HOME}/pnpm podcast-worker'
Restart=on-failure
RestartSec=30
# Never let crash-looping wedge the worker in systemd's start limiter; it must
# keep retrying so it self-heals after a transient failure (e.g. feed/network).
StartLimitIntervalSec=0
Environment=NODE_ENV=production
Environment=PATH=${PNPM_HOME}:/usr/local/bin:/usr/bin:/bin

Expand Down
Loading