Added Docker Support

This commit is contained in:
2026-04-08 13:24:25 +01:00
parent af07ca1174
commit bea99b868c
5 changed files with 97 additions and 0 deletions

View File

@@ -54,6 +54,23 @@ npm run dev:server
The default server URL is `http://localhost:8787`.
## Run The Server In Docker
Build and start the server with Docker Compose:
```bash
docker compose up --build sync-server
```
Or build the image directly:
```bash
docker build -f apps/sync-server/Dockerfile -t obsidian-sync-server .
docker run --rm -p 8787:8787 -v obsidian-sync-data:/app/data obsidian-sync-server
```
The Docker image persists server state in `/app/data`, which is backed by the `obsidian-sync-data` volume in `compose.yaml`.
## Build The Obsidian Plugin
The plugin build now emits a bundled `main.js` directly in `apps/obsidian-plugin`, beside `manifest.json`, which is the layout Obsidian expects for local plugins.
@@ -93,6 +110,8 @@ Use the plugin settings device list to revoke a device that should no longer hav
- `data/sync-state.json`: durable revision, device, tombstone, and key-status state
- `data/logs/server.jsonl`: structured server and client-sync diagnostics
When running under Docker, these same files are stored under `/app/data` inside the container.
## Current Limitations
- The server storage backend is file-based rather than SQLite or PostgreSQL.