mirror of
https://github.com/Nystik-gh/ignis.git
synced 2026-06-17 04:35:53 +00:00
docker deploy setup
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
const path = require('path');
|
||||
const path = require("path");
|
||||
|
||||
module.exports = {
|
||||
port: process.env.PORT || 8080,
|
||||
vaultPath: process.env.VAULT_PATH || path.join(__dirname, '..', 'test-vault'),
|
||||
obsidianAssetsPath: path.join(__dirname, '..', 'investigation', 'obsidian.asar.unpacked'),
|
||||
vaultPath: process.env.VAULT_PATH || path.join(__dirname, "..", "test-vault"),
|
||||
obsidianAssetsPath:
|
||||
process.env.OBSIDIAN_ASSETS_PATH ||
|
||||
path.join(__dirname, "..", "investigation", "obsidian.asar.unpacked"),
|
||||
};
|
||||
|
||||
@@ -40,18 +40,11 @@ app.use("/api/vault", vaultRoutes);
|
||||
app.use("/vault-files", express.static(config.vaultPath));
|
||||
|
||||
// --- Static serving ---
|
||||
// Serve the built shim-loader.js
|
||||
app.use(
|
||||
"/shim-loader.js",
|
||||
express.static(path.join(__dirname, "..", "dist", "shim-loader.js")),
|
||||
);
|
||||
// dist/ has shim-loader.js + patched index.html (dev mode).
|
||||
// In Docker, these live inside the obsidian assets dir instead.
|
||||
app.use(express.static(path.join(__dirname, "..", "dist")));
|
||||
|
||||
// Serve patched index.html at root
|
||||
app.get("/", (req, res) => {
|
||||
res.sendFile(path.join(__dirname, "..", "dist", "index.html"));
|
||||
});
|
||||
|
||||
// Serve obsidian assets
|
||||
// Serve obsidian assets (app.js, app.css, libs, fonts, etc.)
|
||||
app.use(express.static(config.obsidianAssetsPath));
|
||||
|
||||
// --- Start ---
|
||||
|
||||
Reference in New Issue
Block a user