User Tools

Site Tools


tech:newsblur_install

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
tech:newsblur_install [2026/09/11 10:05] – created katsimbristech:newsblur_install [2026/10/07 15:46] (current) – Updating Procedures again katsimbris
Line 217: Line 217:
  
 <code bash> <code bash>
-docker compose up -d+docker compose start
 </code> </code>
  
Line 314: Line 314:
 Because this installation uses the NewsBlur source repository directly, remember that local source modifications can appear in Git. Because this installation uses the NewsBlur source repository directly, remember that local source modifications can appear in Git.
  
-Before updating, it is useful to check:+This installation currently has important local modifications to: 
 + 
 +<code> 
 +docker-compose.yml 
 +utils/feed_fetcher.py 
 +</code> 
 + 
 +The ''docker-compose.yml'' changes are part of this server's local Docker, networking, port-binding, and storage configuration. 
 + 
 +The ''utils/feed_fetcher.py'' change is the local YouTube RSS workaround described below. 
 + 
 +Before updating, check for local changes:
  
 <code bash> <code bash>
Line 321: Line 332:
 git diff git diff
 </code> </code>
 +
 +If ''git diff'' opens in a pager and displays ''(END)'', press:
 +
 +<code>
 +q
 +</code>
 +
 +to return to the command prompt.
  
 A ''git pull'' may refuse to proceed or create a conflict if upstream NewsBlur modifies a file that has also been modified locally. A ''git pull'' may refuse to proceed or create a conflict if upstream NewsBlur modifies a file that has also been modified locally.
Line 326: Line 345:
 Do **not** blindly discard local changes before determining what they are. Do **not** blindly discard local changes before determining what they are.
  
-After updating source/images as appropriate, the normal Docker maintenance process may include:+Next, check whether upstream NewsBlur has changed: 
 + 
 +<code bash> 
 +git fetch 
 +git status 
 +</code> 
 + 
 +''git fetch'' checks for upstream changes without modifying the local NewsBlur files. 
 + 
 +If Git reports: 
 + 
 +<code> 
 +Your branch is up to date with 'origin/main'. 
 +</code> 
 + 
 +there is no NewsBlur source update to install and the source-update procedure can stop here. 
 + 
 +==== Check Local Files Against Upstream ==== 
 + 
 +Before pulling an upstream update, check whether NewsBlur has changed either of the files that are modified locally: 
 + 
 +<code bash> 
 +git diff HEAD..origin/main -- docker-compose.yml 
 +git diff HEAD..origin/main -- utils/feed_fetcher.py 
 +</code> 
 + 
 +If either command produces output, upstream has changed that file since the currently installed version. 
 + 
 +Review those changes before proceeding. 
 + 
 +Even if no upstream changes are shown for these files, save copies of the local modifications before updating. 
 + 
 +==== Save the Local Docker Configuration ==== 
 + 
 +Save the local ''docker-compose.yml'' changes as a patch: 
 + 
 +<code bash> 
 +git diff -- docker-compose.yml > ~/newsblur-docker-compose-local.patch 
 +</code> 
 + 
 +Also save a complete copy of the current local Compose file: 
 + 
 +<code bash> 
 +cp docker-compose.yml ~/newsblur-docker-compose.yml.backup 
 +</code> 
 + 
 +The complete backup is useful because the Compose file contains important server-specific settings such as local port bindings and database/storage locations. 
 + 
 +Optionally review the saved patch: 
 + 
 +<code bash> 
 +cat ~/newsblur-docker-compose-local.patch 
 +</code> 
 + 
 +==== Check and Save the Local YouTube RSS Modification ==== 
 + 
 +This NewsBlur installation includes a local modification to: 
 + 
 +<code> 
 +utils/feed_fetcher.py 
 +</code> 
 + 
 +The modification allows direct YouTube RSS URLs such as: 
 + 
 +<code> 
 +https://www.youtube.com/feeds/videos.xml?channel_id=... 
 +</code> 
 + 
 +to bypass NewsBlur's normal YouTube API-based fetcher and instead be handled as regular RSS feeds. 
 + 
 +Inspect the current upstream YouTube handling: 
 + 
 +<code bash> 
 +git show origin/main:utils/feed_fetcher.py | \ 
 +grep -n -A 8 -B 8 'is_youtube_feed_address(address)' 
 +</code> 
 + 
 +If upstream still contains: 
 + 
 +<code python> 
 +if is_youtube_feed_address(address): 
 +</code> 
 + 
 +and does not otherwise provide equivalent handling for direct ''/feeds/videos.xml'' URLs, the local workaround is still needed. 
 + 
 +Save a copy of the local modification: 
 + 
 +<code bash> 
 +git diff -- utils/feed_fetcher.py > ~/newsblur-youtube-rss-fix.patch 
 +</code> 
 + 
 +Optionally review it: 
 + 
 +<code bash> 
 +cat ~/newsblur-youtube-rss-fix.patch 
 +</code> 
 + 
 +The saved patch should include the important change: 
 + 
 +<code diff> 
 +-        if is_youtube_feed_address(address): 
 ++        if is_youtube_feed_address(address) and "/feeds/videos.xml" not in address: 
 +</code> 
 + 
 +==== Temporarily Stash the Local Changes ==== 
 + 
 +Before pulling the update, temporarily stash both locally modified files: 
 + 
 +<code bash> 
 +git stash push -m "Local NewsBlur server modifications" -- docker-compose.yml utils/feed_fetcher.py 
 +git status 
 +</code> 
 + 
 +Confirm that neither ''docker-compose.yml'' nor ''utils/feed_fetcher.py'' is still listed as modified. 
 + 
 +The existing untracked backup files, such as: 
 + 
 +<code> 
 +docker-compose.yml.original 
 +utils/feed_fetcher.py.bak 
 +</code> 
 + 
 +may still appear under ''Untracked files''. This is normal and does not prevent the update. 
 + 
 +==== Update the NewsBlur Source ==== 
 + 
 +If Git reports that the local branch is behind the upstream branch and the local modifications have been safely backed up and stashed, update the source with: 
 + 
 +<code bash> 
 +git pull --ff-only 
 +</code> 
 + 
 +''--ff-only'' prevents Git from automatically creating a merge commit if the local and upstream histories have unexpectedly diverged. 
 + 
 +==== Review the Updated Files Before Restoring Local Changes ==== 
 + 
 +After the pull completes, inspect the updated Compose file: 
 + 
 +<code bash> 
 +git diff HEAD@{1}..HEAD -- docker-compose.yml 
 +</code> 
 + 
 +If upstream has substantially changed the Compose configuration, review those changes before restoring the old local version. 
 + 
 +Also inspect the updated YouTube handling: 
 + 
 +<code bash> 
 +grep -n -A 8 -B 8 'is_youtube_feed_address(address)' utils/feed_fetcher.py 
 +</code> 
 + 
 +If NewsBlur still sends direct YouTube RSS URLs through its YouTube fetcher, the local YouTube workaround is still needed. 
 + 
 +If upstream NewsBlur appears to have fixed the underlying YouTube RSS issue, **do not blindly restore the old YouTube modification**. Review and test the new upstream behavior first. 
 + 
 +==== Restore the Local Modifications ==== 
 + 
 +If the upstream changes do not make the local modifications obsolete or incompatible, restore them with: 
 + 
 +<code bash> 
 +git stash pop 
 +</code> 
 + 
 +Then inspect the result: 
 + 
 +<code bash> 
 +git status 
 +git diff 
 +</code> 
 + 
 +Confirm that the local ''docker-compose.yml'' settings are still correct and that the YouTube change is present: 
 + 
 +<code diff> 
 +-        if is_youtube_feed_address(address): 
 ++        if is_youtube_feed_address(address) and "/feeds/videos.xml" not in address: 
 +</code> 
 + 
 +If ''git stash pop'' reports a conflict, **do not discard either version**. Review the conflict and reconcile the upstream changes with the local server configuration before continuing. 
 + 
 +The separately saved backup files remain available at: 
 + 
 +<code> 
 +~/newsblur-docker-compose-local.patch 
 +~/newsblur-docker-compose.yml.backup 
 +~/newsblur-youtube-rss-fix.patch 
 +</code> 
 + 
 +==== Update Docker Images and Containers ==== 
 + 
 +After the NewsBlur source and local modifications are in the desired state, update the Docker images and containers:
  
 <code bash> <code bash>
 docker compose pull docker compose pull
 docker compose up -d docker compose up -d
 +docker compose ps
 </code> </code>
 +
 +Confirm that the expected NewsBlur containers are running normally.
  
 Only prune unused Docker images when desired: Only prune unused Docker images when desired:
tech/newsblur_install.1789135531.txt.gz · Last modified: by katsimbris