amangs commited on
Commit
a673681
·
1 Parent(s): 5c78eb5

Copy apps_sync.py to /data/services and seed /data/apps on container startup

Browse files
Files changed (2) hide show
  1. Dockerfile +1 -1
  2. entrypoint.sh +5 -5
Dockerfile CHANGED
@@ -237,7 +237,7 @@ COPY config/ /app/config/
237
  COPY services/ /app/services/
238
  COPY src/ /app/src/
239
  COPY entrypoint.sh /app/entrypoint.sh
240
- RUN chmod +x /app/entrypoint.sh /app/services/*.sh && mkdir -p /data
241
 
242
  WORKDIR /data
243
  ENTRYPOINT ["/app/entrypoint.sh"]
 
237
  COPY services/ /app/services/
238
  COPY src/ /app/src/
239
  COPY entrypoint.sh /app/entrypoint.sh
240
+ RUN chmod +x /app/entrypoint.sh /app/services/*.sh /app/services/*.py && mkdir -p /data
241
 
242
  WORKDIR /data
243
  ENTRYPOINT ["/app/entrypoint.sh"]
entrypoint.sh CHANGED
@@ -47,10 +47,10 @@ ln -sfn /home/appuser/.hermes-web-ui /root/.hermes-web-ui 2>/dev/null || true
47
  ln -sfn /home/appuser/.hermes-web-ui /root/.ekko 2>/dev/null || true
48
 
49
  # Restore persistent database, skills, and configs from /data/apps/ backup
50
- python3 /app/services/apps_sync.py restore || true
51
-
52
- # Launch continuous local background sync daemon (updates /data/apps every 60s on change)
53
- nohup python3 /app/services/apps_sync.py > /tmp/logs/apps-sync.log 2>&1 &
54
 
55
  # Deploy clean opencode-router with assets and public UI into /data/script/opencode-router
56
  mkdir -p /data/script/opencode-router
@@ -85,7 +85,7 @@ for s in /data/services/*.sh; do
85
  fi
86
  done
87
 
88
- for f in /app/services/*.sh; do
89
  target="/data/services/$(basename "$f")"
90
  cp "$f" "$target"
91
  chmod +x "$target"
 
47
  ln -sfn /home/appuser/.hermes-web-ui /root/.ekko 2>/dev/null || true
48
 
49
  # Restore persistent database, skills, and configs from /data/apps/ backup
50
+ if [ -f /app/services/apps_sync.py ]; then
51
+ python3 /app/services/apps_sync.py restore || true
52
+ nohup python3 /app/services/apps_sync.py > /tmp/logs/apps-sync.log 2>&1 &
53
+ fi
54
 
55
  # Deploy clean opencode-router with assets and public UI into /data/script/opencode-router
56
  mkdir -p /data/script/opencode-router
 
85
  fi
86
  done
87
 
88
+ for f in /app/services/*.sh /app/services/*.py; do
89
  target="/data/services/$(basename "$f")"
90
  cp "$f" "$target"
91
  chmod +x "$target"