From 0cc2bbc68601a2a850dde1d02b2748a32ecb4027 Mon Sep 17 00:00:00 2001 From: nmfretz Date: Fri, 13 Nov 2026 11:49:54 +1000 Subject: [PATCH] Add HedgeDoc --- hedgedoc/data/db/.gitkeep | 0 hedgedoc/data/uploads/.gitkeep | 0 hedgedoc/docker-compose.yml | 48 ++++++++++++++++++++++++++++++++++ hedgedoc/exports.sh | 2 ++ hedgedoc/umbrel-app.yml | 41 +++++++++++++++++++++++++++++ 5 files changed, 91 insertions(+) create mode 100644 hedgedoc/data/db/.gitkeep create mode 100644 hedgedoc/data/uploads/.gitkeep create mode 100644 hedgedoc/docker-compose.yml create mode 100644 hedgedoc/exports.sh create mode 100644 hedgedoc/umbrel-app.yml diff --git a/hedgedoc/data/db/.gitkeep b/hedgedoc/data/db/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/hedgedoc/data/uploads/.gitkeep b/hedgedoc/data/uploads/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/hedgedoc/docker-compose.yml b/hedgedoc/docker-compose.yml new file mode 100644 index 000000000..2e793612f --- /dev/null +++ b/hedgedoc/docker-compose.yml @@ -0,0 +1,48 @@ +services: + app_proxy: + environment: + APP_HOST: hedgedoc_app_1 + APP_PORT: 3000 + + app: + image: quay.io/hedgedoc/hedgedoc:1.12.0@sha256:1df4cbc99611ccc9761fd46b08b91e4fc787e9adc5b3f190d1b897a29b825452 + restart: on-failure + depends_on: + db: + condition: service_healthy + # HedgeDoc builds upload links from CMD_DOMAIN, which would pin the app to one + # hostname. Without it upstream throws on image upload, so return a relative + # /uploads/ link instead. Everything else already works with relative URLs. + command: + - sh + - -c + - sed -i "s|(new URL(fileName, config.serverURL + '/uploads/')).href|config.serverURL + '/uploads/' + fileName|" lib/web/imageRouter/filesystem.js && exec node app.js + environment: + CMD_DB_URL: postgres://hedgedoc:${APP_HEDGEDOC_DB_PASSWORD}@hedgedoc_db_1:5432/hedgedoc + CMD_SESSION_SECRET: ${APP_HEDGEDOC_SESSION_SECRET} + CMD_IMAGE_UPLOAD_TYPE: filesystem + # umbrelOS serves the app on a port of the device hostname, so an HSTS header + # over HTTPS would force HTTPS for every other app on that hostname. + CMD_HSTS_ENABLE: "false" + # Don't send a hash of each user's email to libravatar.org for avatars. + CMD_ALLOW_GRAVATAR: "false" + volumes: + - ${APP_DATA_DIR}/data/uploads:/hedgedoc/public/uploads + + db: + image: postgres:18.7-alpine@sha256:75dcac3dfb1cd01ca3536910bbc84128759362f8b118bf8c55b38a94f68f3b73 + restart: on-failure + stop_grace_period: 1m + environment: + POSTGRES_DB: hedgedoc + POSTGRES_USER: hedgedoc + POSTGRES_PASSWORD: ${APP_HEDGEDOC_DB_PASSWORD} + PGDATA: /data/pgdata + healthcheck: + test: "pg_isready -U \"$$POSTGRES_USER\" -d \"$$POSTGRES_DB\"" + interval: 10s + timeout: 5s + retries: 5 + start_period: 30s + volumes: + - ${APP_DATA_DIR}/data/db:/data diff --git a/hedgedoc/exports.sh b/hedgedoc/exports.sh new file mode 100644 index 000000000..cd4938d93 --- /dev/null +++ b/hedgedoc/exports.sh @@ -0,0 +1,2 @@ +export APP_HEDGEDOC_DB_PASSWORD="$(derive_entropy "${app_entropy_identifier}-db-password")" +export APP_HEDGEDOC_SESSION_SECRET="$(derive_entropy "${app_entropy_identifier}-session-secret")" diff --git a/hedgedoc/umbrel-app.yml b/hedgedoc/umbrel-app.yml new file mode 100644 index 000000000..f487909f0 --- /dev/null +++ b/hedgedoc/umbrel-app.yml @@ -0,0 +1,41 @@ +manifestVersion: 1 +id: hedgedoc +storage: + dataRoot: data +category: files +name: HedgeDoc +version: "1.12.0" +tagline: Write and edit Markdown notes together in real time +description: >- + HedgeDoc is a real-time, collaborative Markdown editor. Open a note in your browser and write together with others, with a live preview right next to the text. + + + Create an account with your email address and a password on the HedgeDoc start page, or start writing straight away as a guest. Notes created as a guest are not tied to an account, so sign in first if you want to find them again later. + + + Features: + + - Live collaboration with several people editing the same note at once + + - Markdown preview with code highlighting, tables, task lists, math and diagrams such as Mermaid and Graphviz + + - Turn a note into a slide presentation + + - Upload images straight into your notes + + - Share notes as a read-only page and control who can view or edit each note + + - Note history, tags and a personal overview of your notes +releaseNotes: "" +developer: HedgeDoc +website: https://hedgedoc.org +dependencies: [] +repo: https://github.com/hedgedoc/hedgedoc +support: https://community.hedgedoc.org +port: 3035 +gallery: [] +path: "" +defaultUsername: "" +defaultPassword: "" +submitter: Umbrel +submission: https://github.com/getumbrel/umbrel-apps/pull/6366