Spaces:
Running
Running
Copy all services on boot before restore step so 02-setup-rea-agents.sh executes
Browse files- entrypoint.sh +14 -14
entrypoint.sh
CHANGED
|
@@ -13,6 +13,20 @@ mkdir -p /tmp/{logs,.cache,code-server-cache}
|
|
| 13 |
mkdir -p /home/appuser/{.hermes,.hermes-web-ui}
|
| 14 |
chmod -R 755 /data/services /data/apps
|
| 15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
# Ensure opencode global configuration persists on /data
|
| 17 |
mkdir -p /root/.config
|
| 18 |
ln -sfn /data/config/opencode /root/.config/opencode 2>/dev/null || true
|
|
@@ -77,20 +91,6 @@ ln -sfn /tmp/code-server-cache /data/code-server/CachedData 2>/dev/null || true
|
|
| 77 |
mkdir -p /data/.hermes-web-ui
|
| 78 |
ln -sfn /tmp/logs /data/.hermes-web-ui/logs 2>/dev/null || true
|
| 79 |
|
| 80 |
-
# Sync service scripts into /data/services and remove stale legacy services
|
| 81 |
-
for s in /data/services/*.sh; do
|
| 82 |
-
if [ ! -f "/app/services/$(basename "$s")" ]; then
|
| 83 |
-
echo "🗑️ Removing stale service $(basename "$s")..."
|
| 84 |
-
rm -f "$s"
|
| 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"
|
| 92 |
-
done
|
| 93 |
-
|
| 94 |
# 2. Persistent Caddyfile on /data (user-editable):
|
| 95 |
# Always sync from template to apply latest routing rules and remove stale directives
|
| 96 |
cp /app/config/Caddyfile.example /data/Caddyfile
|
|
|
|
| 13 |
mkdir -p /home/appuser/{.hermes,.hermes-web-ui}
|
| 14 |
chmod -R 755 /data/services /data/apps
|
| 15 |
|
| 16 |
+
# Sync service scripts into /data/services and remove stale legacy services
|
| 17 |
+
for s in /data/services/*.sh; do
|
| 18 |
+
if [ ! -f "/app/services/$(basename "$s")" ]; then
|
| 19 |
+
echo "🗑️ Removing stale service $(basename "$s")..."
|
| 20 |
+
rm -f "$s"
|
| 21 |
+
fi
|
| 22 |
+
done
|
| 23 |
+
|
| 24 |
+
for f in /app/services/*.sh /app/services/*.py; do
|
| 25 |
+
target="/data/services/$(basename "$f")"
|
| 26 |
+
cp "$f" "$target"
|
| 27 |
+
chmod +x "$target"
|
| 28 |
+
done
|
| 29 |
+
|
| 30 |
# Ensure opencode global configuration persists on /data
|
| 31 |
mkdir -p /root/.config
|
| 32 |
ln -sfn /data/config/opencode /root/.config/opencode 2>/dev/null || true
|
|
|
|
| 91 |
mkdir -p /data/.hermes-web-ui
|
| 92 |
ln -sfn /tmp/logs /data/.hermes-web-ui/logs 2>/dev/null || true
|
| 93 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 94 |
# 2. Persistent Caddyfile on /data (user-editable):
|
| 95 |
# Always sync from template to apply latest routing rules and remove stale directives
|
| 96 |
cp /app/config/Caddyfile.example /data/Caddyfile
|