deterministic password for datum (#2583)

This commit is contained in:
Léo Haf 2025-04-15 16:27:36 +02:00 committed by GitHub
parent d11f5a2d48
commit b52d41bdd5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 12 deletions

View File

@ -7,7 +7,7 @@ services:
APP_PORT: 21000
datum:
image: ghcr.io/retropex/datum:1.10@sha256:bcd88108b0bdadb2a387810256130b2b37ed8cde40aaaf2d6ceb54a693e1ad15
image: ghcr.io/retropex/datum:v1.10-umbrel@sha256:ce3414ea91e694fc9d1cc91232524f34124e7eb0643d629aa9bd37ec7c525381
entrypoint: ["/app/datum_gateway"]
command: ["--config=/app/conf/datum_gateway_config.json"]
user: 1000:1000

View File

@ -51,10 +51,12 @@ if [ -f "${DATUM_CONFIG_FILE}" ]; then
jq -e '.api.modify_conf = true' "$DATUM_CONFIG_FILE" > "$DATUM_CONFIG_FILE".tmp && mv "${DATUM_CONFIG_FILE}.tmp" "$DATUM_CONFIG_FILE"
fi
if jq -e '.api.admin_password' "$DATUM_CONFIG_FILE" > /dev/null; then
echo "Admin password already set"
if jq -e '.api.admin_password | select(. == "umbrel")' "$DATUM_CONFIG_FILE" > /dev/null; then
jq --arg password "$APP_PASSWORD" -e '.api.admin_password = $password' "$DATUM_CONFIG_FILE" > "$DATUM_CONFIG_FILE".tmp && mv "${DATUM_CONFIG_FILE}.tmp" "$DATUM_CONFIG_FILE"
elif ! jq -e '.api.admin_password' "$DATUM_CONFIG_FILE" > /dev/null; then
jq --arg password "$APP_PASSWORD" -e '.api.admin_password = $password' "$DATUM_CONFIG_FILE" > "$DATUM_CONFIG_FILE".tmp && mv "${DATUM_CONFIG_FILE}.tmp" "$DATUM_CONFIG_FILE"
else
jq -e '.api.admin_password = "umbrel"' "$DATUM_CONFIG_FILE" > "$DATUM_CONFIG_FILE".tmp && mv "${DATUM_CONFIG_FILE}.tmp" "$DATUM_CONFIG_FILE"
echo "Admin password already set"
fi
else

View File

@ -2,7 +2,7 @@ manifestVersion: 1.1
id: datum
category: bitcoin
name: DATUM
version: "v0.3.1-beta"
version: "v0.3.1-beta-rev1"
tagline: Self-sovereign Bitcoin mining
description: >-
DATUM (Decentralized Alternative Templates for Universal Mining) is a brand new bitcoin mining protocol that allows you to create your own block templates using your own Bitcoin node.
@ -66,15 +66,13 @@ gallery:
- 2.jpg
- 3.jpg
path: ""
defaultPassword: "umbrel"
defaultUsername: "admin"
deterministicPassword: true
releaseNotes: >-
⚠️ Don't forget to add you bitcoin address in the config tab otherwise datum won't start.
The user is "admin" and the default password "umbrel".
⚠️ Don't forget to add your bitcoin address in the config tab otherwise datum won't start.
- New config Tab
- Various bug fixes.
Your password is now deterministically generated by umbrel.
You can consult your password in the app store page.
submitter: Léo Haf
submission: https://github.com/getumbrel/umbrel-apps/pull/1661