docker file
This commit is contained in:
12
Dockerfile
Normal file
12
Dockerfile
Normal file
@@ -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"]
|
||||
17
app.sh
Executable file
17
app.sh
Executable file
@@ -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"
|
||||
Reference in New Issue
Block a user