Skip to content

Conversation

@X9X0
Copy link
Owner

@X9X0 X9X0 commented Nov 20, 2025

Adds a comprehensive update system to ensure Docker containers always reflect the latest code changes after git pull.

New features:

  1. lablink-update command (installed on all new Pi images):

    • Automatically pulls latest code from git
    • Rebuilds Docker containers with --no-cache
    • Waits for services to be healthy
    • Shows before/after commit hashes
    • Skips rebuild if already up to date (with override option)
    • Displays final status
  2. Standalone script (lablink-update.sh):

    • Can be run on existing Pis
    • Supports specifying branch: sudo ./lablink-update.sh main
    • Works even if lablink-update command not installed yet
  3. Updated helper commands and documentation:

    • Added to lablink-status output
    • Added to MOTD (message of the day)
    • Added to first-boot completion message

Usage:

On Pi with new image:

sudo lablink-update

On existing Pi:

cd /opt/lablink
curl -O https://raw.githubusercontent.com/X9X0/LabLink/main/lablink-update.sh
chmod +x lablink-update.sh
sudo ./lablink-update.sh

This solves the problem where git pull updates files but Docker containers continue running old code until manually rebuilt.

Adds a comprehensive update system to ensure Docker containers always
reflect the latest code changes after git pull.

New features:

1. lablink-update command (installed on all new Pi images):
   - Automatically pulls latest code from git
   - Rebuilds Docker containers with --no-cache
   - Waits for services to be healthy
   - Shows before/after commit hashes
   - Skips rebuild if already up to date (with override option)
   - Displays final status

2. Standalone script (lablink-update.sh):
   - Can be run on existing Pis
   - Supports specifying branch: sudo ./lablink-update.sh main
   - Works even if lablink-update command not installed yet

3. Updated helper commands and documentation:
   - Added to lablink-status output
   - Added to MOTD (message of the day)
   - Added to first-boot completion message

Usage:
  # On Pi with new image:
  sudo lablink-update

  # On existing Pi:
  cd /opt/lablink
  curl -O https://raw.githubusercontent.com/X9X0/LabLink/main/lablink-update.sh
  chmod +x lablink-update.sh
  sudo ./lablink-update.sh

This solves the problem where git pull updates files but Docker
containers continue running old code until manually rebuilt.
@X9X0 X9X0 merged commit 9318f55 into main Nov 20, 2025
25 checks passed
@X9X0 X9X0 deleted the claude/debug-client-server-pi-013gro9B5KVA6EY6mD2JLUoL branch November 20, 2025 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants