commit d6da982fa2e9062718ae887f7e19e08aca49dd5e Author: Lauren Kaviak Date: Mon Jun 15 03:10:34 2026 -0500 docker file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c31291b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM node:22-alpine + +RUN apk add --no-cache --virtual .gyp \ + python3 \ + make \ + g++ \ + && npm install \ + -g obsidian-headless \ + && apk del .gyp +WORKDIR /app +COPY ./app.sh /app/run.sh +ENTRYPOINT ["sh"] \ No newline at end of file diff --git a/app.sh b/app.sh new file mode 100755 index 0000000..af912d5 --- /dev/null +++ b/app.sh @@ -0,0 +1,17 @@ +#!/bin/sh +EMAIL=$(cat $EMAIL_FILE) +PASSWORD=$(cat $PASSWORD_FILE) + +ob login --email "$EMAIL" --password "$PASSWORD" + +# Source - https://stackoverflow.com/a/13864829 +# Posted by Lionel, modified by community. See post 'Timeline' for change history +# Retrieved 2026-06-15, License - CC BY-SA 4.0 + +if [ -z ${VAULT_PASSWORD_FILE+x} ]; then + ob sync-setup --vault "$VAULT_NAME" --path "$SYNC_FOLDER"; +else + ob sync-setup --vault "$VAULT_NAME" --path "$SYNC_FOLDER" --password "$(< $VAULT_PASSWORD_FILE)"; +fi + +ob sync --path "$SYNC_FOLDER" \ No newline at end of file