Spaces:
Running
Running
Hermes Agent commited on
Commit ·
ddad62f
1
Parent(s): 626521e
Run omniroute runtime repair in Dockerfile and entrypoint.sh to build better-sqlite3 native bindings
Browse files- Dockerfile +2 -1
- entrypoint.sh +2 -1
Dockerfile
CHANGED
|
@@ -38,9 +38,10 @@ RUN pip3 install --no-cache-dir aiohttp pyrogram tgcrypto open-webui --break-sys
|
|
| 38 |
RUN curl -fsSL https://nodejs.org/dist/v22.14.0/node-v22.14.0-linux-x64.tar.gz \
|
| 39 |
| tar -xz -C /usr/local --strip-components=1
|
| 40 |
|
| 41 |
-
# Install OmniRoute globally and ensure Next.js cache dirs are writable
|
| 42 |
RUN npm install -g omniroute \
|
| 43 |
&& OMNIROUTE_PKG="$(npm root -g)/omniroute" \
|
|
|
|
| 44 |
&& mkdir -p "${OMNIROUTE_PKG}/.next/cache" /root/.cache /data/omniroute \
|
| 45 |
&& chmod -R 777 "${OMNIROUTE_PKG}/.next" /root/.cache
|
| 46 |
|
|
|
|
| 38 |
RUN curl -fsSL https://nodejs.org/dist/v22.14.0/node-v22.14.0-linux-x64.tar.gz \
|
| 39 |
| tar -xz -C /usr/local --strip-components=1
|
| 40 |
|
| 41 |
+
# Install OmniRoute globally, repair runtime binaries (better-sqlite3), and ensure Next.js cache dirs are writable
|
| 42 |
RUN npm install -g omniroute \
|
| 43 |
&& OMNIROUTE_PKG="$(npm root -g)/omniroute" \
|
| 44 |
+
&& omniroute runtime repair || true \
|
| 45 |
&& mkdir -p "${OMNIROUTE_PKG}/.next/cache" /root/.cache /data/omniroute \
|
| 46 |
&& chmod -R 777 "${OMNIROUTE_PKG}/.next" /root/.cache
|
| 47 |
|
entrypoint.sh
CHANGED
|
@@ -90,8 +90,9 @@ if command -v omniroute >/dev/null 2>&1; then
|
|
| 90 |
export INITIAL_PASSWORD="admin"
|
| 91 |
export DISABLE_SQLITE_AUTO_BACKUP="true"
|
| 92 |
export NODE_ENV="production"
|
|
|
|
| 93 |
omniroute serve --port 20128 --no-open &
|
| 94 |
-
echo "[INIT] OmniRoute started in background with required secrets, HOSTNAME un-set, and
|
| 95 |
else
|
| 96 |
echo "[WARN] omniroute binary not found, skipping background service."
|
| 97 |
fi
|
|
|
|
| 90 |
export INITIAL_PASSWORD="admin"
|
| 91 |
export DISABLE_SQLITE_AUTO_BACKUP="true"
|
| 92 |
export NODE_ENV="production"
|
| 93 |
+
omniroute runtime repair 2>&1 || true
|
| 94 |
omniroute serve --port 20128 --no-open &
|
| 95 |
+
echo "[INIT] OmniRoute started in background with required secrets, HOSTNAME un-set, and runtime repair."
|
| 96 |
else
|
| 97 |
echo "[WARN] omniroute binary not found, skipping background service."
|
| 98 |
fi
|