Files
Nathan Fretz b37acac65a Update outline to v1.12.0 and serve it over HTTPS (#5765)
Use umbrelOS 2.0 requiresHttps so Outline always opens over HTTPS, and point Outline's URL and the Dex redirect URI at https. The Dex config is now generated entirely by the pre-start hook, since app updates never deliver files under data/, so existing installs get the new redirect URI.
2026-11-13 12:10:18 +10:00

43 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
# Generate the Dex config. It lives in this hook (not a template under data/)
# because app updates deliver hooks but never the app's data dir.
APP_OUTLINE_PORT="${APP_OUTLINE_PORT:-8942}"
DATA_ROOT="${APP_DATA_ROOT:-${UMBREL_ROOT}/app-data/${APP_ID}/data}"
# Generate bcrypt hash for APP_PASSWORD
# Using htpasswd from apache2-utils (available in most systems)
PASSWORD_HASH=$(docker run --rm alpine:latest sh -c "apk add --no-cache apache2-utils > /dev/null 2>&1 && htpasswd -bnBC 10 '' '${APP_PASSWORD}' | tr -d ':\n'")
mkdir -p "${DATA_ROOT}/config"
cat > "${DATA_ROOT}/config/config.yaml" <<CONFIG
issuer: http://${DEVICE_DOMAIN_NAME}:8943/dex
storage:
type: sqlite3
config:
file: /var/dex/dex.db
web:
http: 0.0.0.0:5556
staticClients:
- id: outline
redirectURIs:
- 'https://${DEVICE_DOMAIN_NAME}:${APP_OUTLINE_PORT}/auth/oidc.callback'
name: 'Outline'
secret: ${APP_SEED}
oauth2:
skipApprovalScreen: true
enablePasswordDB: true
staticPasswords:
- email: "umbrel@umbrel.local"
hash: "${PASSWORD_HASH}"
username: "umbrel"
userID: "08a8684b-db88-4b73-90a9-3cd1661f5466"
CONFIG