Skip to content

fix(docker): use git commit comparison for volume update detection#1594

Open
GratefulDave wants to merge 1 commit into
agent0ai:mainfrom
GratefulDave:fix/docker-deploy-improvements
Open

fix(docker): use git commit comparison for volume update detection#1594
GratefulDave wants to merge 1 commit into
agent0ai:mainfrom
GratefulDave:fix/docker-deploy-improvements

Conversation

@GratefulDave
Copy link
Copy Markdown

Summary

  • Replace the naive "file exists" check in copy_A0.sh with git commit hash comparison so Docker image updates automatically sync code to the mounted volume.

Problem

Previously, once /a0/run_ui.py existed the copy was skipped forever, leaving stale code on the volume after image upgrades. Users had to manually delete the volume to get updated code.

Changes

docker/run/fs/ins/copy_A0.sh:

  • First run (empty volume): initial copy (unchanged behavior)
  • Image commit ≠ volume commit: overwrite code files while preserving user data not in the source
  • Commits match: skip copy (fast startup)

Replace the naive 'file exists' check with git commit hash comparison
so that Docker image updates automatically sync code to the mounted
volume. Previously, once /a0/run_ui.py existed the copy was skipped
forever, leaving stale code on the volume after image upgrades.

Now:
- First run (empty volume): initial copy (unchanged behavior)
- Image commit != volume commit: overwrite code files while preserving
  user data not present in the source
- Commits match: skip copy (fast startup)
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.

2 participants