Add HedgeDoc (#6366)

This commit is contained in:
Nathan Fretz authored and GitHub committed 2026-12-03 12:50:17 +10:00
1 parent 5f9dee031b
commit 0ff4ef81f1
5 files changed
+103

No files matched your search

View File
Whitespace-only changes.
View File
Whitespace-only changes.
+56
View File
@@ -0,0 +1,56 @@
services:
app_proxy:
environment:
APP_HOST: hedgedoc_app_1
APP_PORT: 3000
app:
image: quay.io/hedgedoc/hedgedoc:1.12.3@sha256:9e5b57ef05b476d2e849042d7915872410a667380c1c29231ff17456e78897a2
restart: on-failure
depends_on:
db:
condition: service_healthy
# HedgeDoc builds upload links and its CSP script/style sources from
# CMD_DOMAIN, which would pin the app to one hostname. Without it, image
# upload throws and browsers reject the CSP paths, so patch both to work on
# any hostname. Stop with an error if upstream changes these lines.
command:
- sh
- -c
- |
set -e
U=lib/web/imageRouter/filesystem.js
grep -qF "new URL(fileName, config.serverURL + '/uploads/')" "$$U" || grep -qF "config.serverURL + '/uploads/' + fileName" "$$U" || { echo "Upload patch no longer matches" >&2; exit 1; }
grep -qF "config.serverURL + '/build/'" lib/csp.js || grep -qF "\"'self'\"" lib/csp.js || { echo "CSP patch no longer matches" >&2; exit 1; }
sed -i "s|(new URL(fileName, config.serverURL + '/uploads/')).href|config.serverURL + '/uploads/' + fileName|" "$$U"
sed -i -e "s|config.serverURL + '/build/'|\"'self'\"|g" -e "s|config.serverURL + '/js/'|\"'self'\"|" -e "s|config.serverURL + '/css/'|\"'self'\"|" -e "s|config.serverURL + '/config'|\"'self'\"|" lib/csp.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:0115267ab5a509022df9319c77be365cef335adb71556c75f60f5360ee247e71
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
+2
View File
@@ -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")"
+45
View File
@@ -0,0 +1,45 @@
manifestVersion: 1
id: hedgedoc
storage:
dataRoot: data
category: files
name: HedgeDoc
version: "1.12.3"
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:
- 1.webp
- 2.webp
- 3.webp
- 4.webp
path: ""
defaultUsername: ""
defaultPassword: ""
submitter: Umbrel
submission: https://github.com/getumbrel/umbrel-apps/pull/6366