feat: add Obsidian CLI API service
Build and Push Docker Container / build-and-push (push) Successful in 4m26s
Build and Push Docker Container / build-and-push (push) Successful in 4m26s
- Add Docker image for the official Obsidian desktop app and CLI. - Start Obsidian headlessly with Xvfb and DBus setup. - Expose a safe structured HTTP command API without shell execution. - Add JWT-based vault, path, and command authorization. - Support single-vault and multi-vault container mounts. - Add TypeScript SDK helpers for Obsidian CLI commands. - Add n8n community node package with Obsidian operations. - Add docs, compose config, tests, and production image workflow.
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
services:
|
||||
obsidian-api:
|
||||
build:
|
||||
context: .
|
||||
args:
|
||||
OBSIDIAN_VERSION: ${OBSIDIAN_VERSION:-1.12.7}
|
||||
image: obsidian-api:local
|
||||
container_name: obsidian-api
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
# JWT signing secret. Bearer tokens are HS256 JWTs with vault/path/command claims.
|
||||
OBSIDIAN_JWT_SECRET: ${OBSIDIAN_JWT_SECRET:-}
|
||||
OBSIDIAN_CLI_BIN: ${OBSIDIAN_CLI_BIN:-obsidian}
|
||||
# Single-vault fallback. For multiple vaults, set OBSIDIAN_VAULTS below.
|
||||
OBSIDIAN_VAULT_PATH: /vault
|
||||
# Multi-vault syntax: name=/container/path,name2=/container/path2
|
||||
# Example with the optional /vaults mount below: main=/vault,work=/vaults/work,personal=/vaults/personal
|
||||
OBSIDIAN_VAULTS: ${OBSIDIAN_VAULTS:-}
|
||||
OBSIDIAN_STARTUP_TIMEOUT: ${OBSIDIAN_STARTUP_TIMEOUT:-60}
|
||||
COMMAND_TIMEOUT: ${COMMAND_TIMEOUT:-60}
|
||||
MAX_COMMAND_TIMEOUT: ${MAX_COMMAND_TIMEOUT:-300}
|
||||
volumes:
|
||||
# Default/single vault mount.
|
||||
- ${OBSIDIAN_VAULT_PATH:-./vault}:/vault
|
||||
# Optional parent-folder mount for multiple vaults. Example:
|
||||
# OBSIDIAN_VAULTS_ROOT=/home/daniel/Documents/Obsidian
|
||||
# OBSIDIAN_VAULTS=main=/vault,work=/vaults/Work,personal=/vaults/Personal
|
||||
- ${OBSIDIAN_VAULTS_ROOT:-./vaults}:/vaults
|
||||
ports:
|
||||
- "${OBSIDIAN_API_PORT:-8080}:8080"
|
||||
Reference in New Issue
Block a user