-
Notifications
You must be signed in to change notification settings - Fork 499
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
24 lines (24 loc) · 1.15 KB
/
Copy pathdocker-compose.yml
File metadata and controls
24 lines (24 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
services:
mcp-obsidian:
build: .
image: mcp-obsidian:latest
# Auto-start with the Docker daemon (e.g. on host boot) and keep
# restarting on crash; only a manual `docker compose stop` keeps it down.
restart: unless-stopped
# MCP talks JSON-RPC over stdio, so stdin must stay open and unbuffered.
# stdin_open keeps the container alive under `up -d` even with nothing
# attached yet (otherwise it'd hit EOF on stdin and exit immediately).
# No TTY: run it as `docker compose run --rm -T mcp-obsidian`.
stdin_open: true
tty: false
extra_hosts:
# Lets the container reach Obsidian's Local REST API on the host.
# Docker Desktop (Mac/Windows) provides host.docker.internal natively;
# this entry makes it resolve on Linux too (Docker 20.10+).
- "host.docker.internal:host-gateway"
environment:
# OBSIDIAN_API_KEY is required; the server exits with a clear error if
# it's unset. Not enforced here so `docker compose build` doesn't need it.
OBSIDIAN_API_KEY: ${OBSIDIAN_API_KEY:-}
OBSIDIAN_HOST: ${OBSIDIAN_HOST:-host.docker.internal}
OBSIDIAN_PORT: ${OBSIDIAN_PORT:-27124}