Badal commited on
Commit ·
07d5099
1
Parent(s): ac644e7
Optimize: Clean cache folders before restore
Browse files- entrypoint.sh +9 -0
entrypoint.sh
CHANGED
|
@@ -18,6 +18,15 @@ git config --global user.name 'Badal'
|
|
| 18 |
OP_PATH=$(find / -name opencode -type f -printf '%h' -quit 2>/dev/null)
|
| 19 |
export PATH="$OP_PATH:$PATH"
|
| 20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
# ============================================
|
| 22 |
# STEP 1: RESTORE (Try, but continue if bucket empty)
|
| 23 |
# ============================================
|
|
|
|
| 18 |
OP_PATH=$(find / -name opencode -type f -printf '%h' -quit 2>/dev/null)
|
| 19 |
export PATH="$OP_PATH:$PATH"
|
| 20 |
|
| 21 |
+
# ============================================
|
| 22 |
+
# STEP 0: CLEANUP CACHE BEFORE RESTORE (Speed up)
|
| 23 |
+
# ============================================
|
| 24 |
+
echo '=== [STEP 0] CLEANING CACHE FOLDERS ==='
|
| 25 |
+
rm -rf /data/.cache 2>/dev/null
|
| 26 |
+
rm -rf /data/.npm 2>/dev/null
|
| 27 |
+
rm -rf /data/.bun 2>/dev/null
|
| 28 |
+
echo '=== [STEP 0] CLEANUP DONE ==='
|
| 29 |
+
|
| 30 |
# ============================================
|
| 31 |
# STEP 1: RESTORE (Try, but continue if bucket empty)
|
| 32 |
# ============================================
|