fix: add login.sh helper and graceful not-logged-in handling in entrypoint

This commit is contained in:
hermes
2026-04-23 14:32:50 +00:00
parent b8ac794479
commit 8de1a164e1
3 changed files with 75 additions and 36 deletions
Executable
+17
View File
@@ -0,0 +1,17 @@
#!/bin/bash
# login.sh — Run this once to authenticate obsidian-headless.
# Starts a temporary container just for login.
# The session is saved to ./config and persists into the main container.
set -e
echo "Starting temporary login container..."
echo ""
docker-compose run --rm \
--entrypoint "ob" \
obsidian-sync login
echo ""
echo "Login complete. You can now start the sync server:"
echo " docker-compose up -d"