simplify obsidian fetch, upgrade to 1.12.7

This commit is contained in:
Nystik
2026-05-16 02:51:00 +02:00
parent c30e105c6e
commit 2e66588b62
8 changed files with 16 additions and 22 deletions

View File

@@ -18,7 +18,7 @@ RUN npm run build
FROM node:22-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates curl binutils xz-utils gosu \
ca-certificates curl gosu \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
@@ -38,7 +38,7 @@ RUN chmod +x /app/scripts/entrypoint.sh
ENV PORT=8080
ENV VAULT_ROOT=/vaults
ENV OBSIDIAN_VERSION=1.12.4
ENV OBSIDIAN_VERSION=1.12.7
ENV OBSIDIAN_ASSETS_PATH=/app/obsidian-app
ENV PUID=1000
ENV PGID=1000

View File

@@ -85,7 +85,7 @@ services:
ports:
- "8080:8080"
environment:
- OBSIDIAN_VERSION=1.12.4
- OBSIDIAN_VERSION=1.12.7
- PUID=1000
- PGID=1000
volumes:
@@ -113,7 +113,7 @@ volumes:
| `PORT` | Server listen port | `8080` |
| `VAULT_ROOT` | Path to vault storage inside the container | `/vaults` |
| `DATA_ROOT` | Path to persistent data (plugin config, sync state, auth tokens) | `/app/data` |
| `OBSIDIAN_VERSION` | Obsidian version to download | `1.12.4` |
| `OBSIDIAN_VERSION` | Obsidian version to download | `1.12.7` |
| `PUID` | User ID for file ownership | `1000` |
| `PGID` | Group ID for file ownership | `1000` |
| `WRITE_COALESCE_MS` | Debounce window (ms) for rapid writes. Useful for slow filesystems (rclone, NFS, SMB). Set to `0` to disable. | `5000` |

View File

@@ -4,7 +4,7 @@ services:
ports:
- "8082:8080"
environment:
- OBSIDIAN_VERSION=1.12.4
- OBSIDIAN_VERSION=1.12.7
volumes:
- ./vaults:/vaults
- ./data:/app/data

View File

@@ -26,7 +26,7 @@ services:
# To build from source instead, comment out `image` and uncomment:
# build: ../../
environment:
- OBSIDIAN_VERSION=1.12.4
- OBSIDIAN_VERSION=1.12.7
volumes:
- ./vaults:/vaults
- ./data:/app/data

View File

@@ -17,7 +17,7 @@ services:
# To build from source instead, comment out `image` and uncomment:
# build: ../../
environment:
- OBSIDIAN_VERSION=1.12.4
- OBSIDIAN_VERSION=1.12.7
volumes:
- ./vaults:/vaults
- ./data:/app/data

View File

@@ -27,25 +27,19 @@ fi
chown -R "$PUID:$PGID" /vaults /app/obsidian-app
OBSIDIAN_DIR="/app/obsidian-app"
OBSIDIAN_VERSION="${OBSIDIAN_VERSION:-1.12.4}"
OBSIDIAN_VERSION="${OBSIDIAN_VERSION:-1.12.7}"
if [ ! -f "$OBSIDIAN_DIR/index.html" ]; then
echo "[ignis] First run. Downloading Obsidian v${OBSIDIAN_VERSION}..."
curl -fSL "https://github.com/obsidianmd/obsidian-releases/releases/download/v${OBSIDIAN_VERSION}/obsidian_${OBSIDIAN_VERSION}_amd64.deb" \
-o /tmp/obsidian.deb
echo "[ignis] Extracting .deb..."
mkdir -p /tmp/obsidian-deb /tmp/obsidian-pkg
ar x /tmp/obsidian.deb --output=/tmp/obsidian-deb
tar -xf /tmp/obsidian-deb/data.tar.xz -C /tmp/obsidian-pkg
curl -fSL "https://github.com/obsidianmd/obsidian-releases/releases/download/v${OBSIDIAN_VERSION}/obsidian-${OBSIDIAN_VERSION}.asar.gz" \
-o /tmp/obsidian.asar.gz
echo "[ignis] Unpacking asar..."
npx --yes @electron/asar extract \
/tmp/obsidian-pkg/opt/Obsidian/resources/obsidian.asar \
"$OBSIDIAN_DIR"
gunzip /tmp/obsidian.asar.gz
npx --yes @electron/asar extract /tmp/obsidian.asar "$OBSIDIAN_DIR"
rm -rf /tmp/obsidian.deb /tmp/obsidian-deb /tmp/obsidian-pkg
rm -f /tmp/obsidian.asar
echo "[ignis] Obsidian v${OBSIDIAN_VERSION} ready."
else

View File

@@ -79,12 +79,12 @@ module.exports = {
obsidianAssetsPath:
process.env.OBSIDIAN_ASSETS_PATH ||
path.join(__dirname, "..", "investigation", "obsidian_1.12.4_unpacked"),
path.join(__dirname, "..", "investigation", "obsidian_1.12.7_unpacked"),
get obsidianVersion() {
const assetsPath =
process.env.OBSIDIAN_ASSETS_PATH ||
path.join(__dirname, "..", "investigation", "obsidian_1.12.4_unpacked");
path.join(__dirname, "..", "investigation", "obsidian_1.12.7_unpacked");
try {
const pkg = JSON.parse(
fs.readFileSync(path.join(assetsPath, "package.json"), "utf-8"),

View File

@@ -1,7 +1,7 @@
export const processShim = {
platform: "linux",
versions: {
electron: "28.0.0",
electron: "28.2.3",
node: "18.18.0",
chrome: "120.0.0.0",
},