Provide custom build of standardnotes client side image/binaries.
- Docker image for standardnotes web
- Android APK for standardnotes mobile
- [TODO] ASAR file for Desktop version
Will not provide iOS related binaries.
Note: Although they claim this(and lock the thread LOL) and this (Yes, you're secure, but what if you go out of business. Meme here: there's no cloud , just SOMEBODY ELSE'S COMPUTER ), Those who self-hosting client-side part(like web) ought to be ABLE TO USE the full range of client-side features. So I modified the javascript part (isThirdPartyHostUsed isUrlFirstParty function) to bypass client-side check (Available after 3.147.0). Thank you standardnotes BUT F**K YOU.
Note: StandardNotes change the part i modified from 3.169.17, and i haven't updated the corresponding modification. So if you requires modification, don't use image/apk from 3.169.33 to 3.181.1
I modified isThirdPartyHostUsed
isUrlFirstParty
function and built apk with a public shared android certificate (alias: "android" key-password: 123456 keystore-password: 123456) (so you can build and update your own apk seamlessly).
And also since it is a public shared certificate, use it under your own risk (for example: attacked by sharedUserId mechanism).
The APK's versionCode is based on unixtimestamp / 60, basically you'll not encounter downgrade issue.
Adjust minsdk version from 28 to 21 for old devices.
Note: Since there's no CSP header in HTTP response of this image, use it under your own risk.
Since standardnotes use static-web hosting on S3 and Cloudfront instead of using standardnotes/web
docker image (Ruby-On-Rails based web server), so there's no standardnotes/web
docker image anymore.
However the static web do not support configure sync server url and other settings. For self-hosters, we need a docker image which is configurable.
In this repo, The workflow of build-and-push task is manually triggered with user inputed standardnotes/web's version and weekly based schedule triggered with automatically fetching the latest standardnotes/web's version.
You can also build it yourself with Buildkit.
Using (with docker buildx plugin)
docker buildx build --build-arg STANDARDNOTES_WEB_VERSION=3.x.x -f ./Dockerfile .
or
DOCKER_BUILDKIT=1 docker build --build-arg STANDARDNOTES_WEB_VERSION=3.x.x -f ./Dockerfile .
Docker Build Arguments:
STANDARDNOTES_WEB_VERSION
: the standardnote/web tag version (example @standardnotes/web@3.44.3 -> 3.44.3)
-
Javascript Heap Overflow
add
ENV NODE_OPTIONS=--max_old_space_size=<SMALLER_MEMSIZE_IN_MB>
beforeRUN yarn ...
in Dockerfile -
Buildkit not supported/ Heredoc syntax not supported
create a
40-standardnotes-app-envsubst.sh
which content is the string between twoEOF
s , thenchmod +x 40-standardnotes-app-envsubst.sh
and then replaceCOPY <<EOF ... EOF
toCOPY 40-standardnotes-app-envsubst.sh /docker-entrypoint.d/
and deleteRUN chmod +x ...
and delete the first line# syntax=docker/dockerfile:1.4
, thendocker build --build-arg STANDARDNOTES_WEB_VERSION=3.x.x -f ./Dockerfile .
Runtime environments (same from .env.sample):
$APP_HOST
$DEFAULT_SYNC_SERVER
$DEFAULT_FILES_HOST
$ENABLE_UNFINISHED_FEATURES
$WEBSOCKET_URL
$PURCHASE_URL
$PLANS_URL
$DASHBOARD_URL
Since this image is based on nginx:alpine, so all nginx's environments and configurations are supported.
Example:
docker run -p 8080:80 -d -e APP_HOST=https://example.com -e DEFAULT_SYNC_SERVER=https://app.example.com docker pull ghcr.io/jackyzy823/standardnotes-web:3.x.x
Please refer to #3, Thanks @webysther.