diff --git a/btc-datum/data/settings/datum_gateway_config.json b/btc-datum/data/settings/datum_gateway_config.json index 1ed9200..1cced5b 100644 --- a/btc-datum/data/settings/datum_gateway_config.json +++ b/btc-datum/data/settings/datum_gateway_config.json @@ -2,40 +2,28 @@ "bitcoind": { "rpcuser": "auto-configure-on-install", "rpcpassword": "auto-configure-on-install", - "rpcurl": "auto-configure-on-install", - "work_update_seconds": 40 + "rpcurl": "auto-configure-on-install" }, "api": { - "listen_port": 21000 + "listen_port": 21000, + "modify_conf": true, + "admin_password": "umbrel" + }, "mining": { - "pool_address": "enter your bitcoin address", + "pool_address": "", "coinbase_tag_primary": "DATUM on Umbrel", - "coinbase_tag_secondary": "DATUM on Umbrel", - "coinbase_unique_id": 120 + "coinbase_tag_secondary": "DATUM on Umbrel" }, "stratum": { - "listen_port": 23334, - "max_clients_per_thread": 1000, - "max_threads": 8, - "max_clients": 2048, - "vardiff_min": 16384, - "vardiff_target_shares_min": 8, - "vardiff_quickdiff_count": 8, - "vardiff_quickdiff_delta": 8, - "share_stale_seconds": 120, - "fingerprint_miners": true + "listen_port": 23334 }, "logger": { "log_level_console": 2 }, "datum": { - "pool_host": "datum-beta1.mine.ocean.xyz", - "pool_port": 28915, - "pool_pubkey": "f21f2f0ef0aa1970468f22bad9bb7f4535146f8e4a8f646bebc93da3d89b1406f40d032f09a417d94dc068055df654937922d2c89522e3e8f6f0e649de473003", "pool_pass_workers": true, "pool_pass_full_users": true, - "always_pay_self": true, "pooled_mining_only": true } } \ No newline at end of file diff --git a/btc-datum/docker-compose.yml b/btc-datum/docker-compose.yml index df101b7..d3b4eb4 100644 --- a/btc-datum/docker-compose.yml +++ b/btc-datum/docker-compose.yml @@ -7,11 +7,13 @@ services: APP_PORT: 21000 datum: - image: ghcr.io/retropex/datum:1.8@sha256:718411c69d5b3e147857a7af6a99dcf4ff013191aec2a2acbad6ce47ffc0e1ed + image: ghcr.io/retropex/datum:1.10@sha256:bcd88108b0bdadb2a387810256130b2b37ed8cde40aaaf2d6ceb54a693e1ad15 + entrypoint: ["/app/datum_gateway"] + command: ["--config=/app/conf/datum_gateway_config.json"] user: 1000:1000 restart: on-failure volumes: - - ${APP_DATA_DIR}/data/settings/datum_gateway_config.json:/app/datum_gateway_config.json + - ${APP_DATA_DIR}/data/settings/:/app/conf/ ports: # datum gateway port - - 23334:23334 + - 23334:23334 \ No newline at end of file diff --git a/btc-datum/hooks/pre-start b/btc-datum/hooks/pre-start index 9693c37..ea6815d 100755 --- a/btc-datum/hooks/pre-start +++ b/btc-datum/hooks/pre-start @@ -38,7 +38,26 @@ if [ -f "${DATUM_CONFIG_FILE}" ]; then echo "DATUM configuration is up-to-date." fi + if jq -e '.mining.pool_address | select(. == "enter your bitcoin address")' "$DATUM_CONFIG_FILE" > /dev/null; then + + echo "Bitcoin address invalid, resetting." + jq -e '.mining.pool_address = ""' "$DATUM_CONFIG_FILE" > "$DATUM_CONFIG_FILE".tmp && mv "${DATUM_CONFIG_FILE}.tmp" "$DATUM_CONFIG_FILE" + + fi + + if jq -e '.api.modify_conf' "$DATUM_CONFIG_FILE" > /dev/null; then + echo "New API already set" + else + 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" + else + jq -e '.api.admin_password = "umbrel"' "$DATUM_CONFIG_FILE" > "$DATUM_CONFIG_FILE".tmp && mv "${DATUM_CONFIG_FILE}.tmp" "$DATUM_CONFIG_FILE" + fi + else echo "DATUM configuration file not found. Installation incomplete." exit 1 -fi +fi \ No newline at end of file diff --git a/btc-datum/umbrel-app.yml b/btc-datum/umbrel-app.yml index aacbab1..aa47a0e 100644 --- a/btc-datum/umbrel-app.yml +++ b/btc-datum/umbrel-app.yml @@ -2,7 +2,7 @@ manifestVersion: 1.1 id: btc-datum category: mining name: DATUM -version: "v0.2.2-beta" +version: "v0.3.1-beta" tagline: Self-sovereign Bitcoin mining icon: https://raw.githubusercontent.com/getumbrel/umbrel-apps-gallery/refs/heads/master/datum/icon.svg description: >- @@ -66,8 +66,16 @@ gallery: - https://raw.githubusercontent.com/getumbrel/umbrel-apps-gallery/refs/heads/master/datum/2.jpg - https://raw.githubusercontent.com/getumbrel/umbrel-apps-gallery/refs/heads/master/datum/3.jpg path: "" -defaultPassword: "" +defaultUsername: "admin" +defaultPassword: "umbrel" releaseNotes: >- - Various bug fixes. + ⚠️ Don't forget to add your bitcoin address in the config tab otherwise datum won't start. + + The user is "admin" and the default password "umbrel". + + + - New config Tab + + - Various bug fixes. submitter: Léo Haf submission: https://github.com/Retropex/Bitcoin-store/pull/1