Multi-stage Dockerfile clones KamadoPool at a pinned SHA, builds ckpool and kamado-api (with embedded Svelte UI), runtime image supervises both processes via tini + wait -n. Config covers bitcoind mainnet/testnet4 variant, payout address, coinbase tag, vardiff knobs, and log level. Web UI interface only — stratum :3333 requires a router port-forward or simpleproxy workaround because StartOS 0.3.x does not forward raw TCP on LAN. TODO before first build: pin KAMADO_REPO + KAMADO_SHA in the Dockerfile to a pushed commit.
32 lines
854 B
Makefile
32 lines
854 B
Makefile
PKG_ID := $(shell yq -r .id manifest.yaml)
|
|
PKG_VERSION := $(shell yq -r .version manifest.yaml)
|
|
|
|
TS_FILES := $(shell find ./scripts -name \*.ts 2>/dev/null)
|
|
|
|
.DELETE_ON_ERROR:
|
|
|
|
all: verify
|
|
|
|
verify: $(PKG_ID).s9pk
|
|
start-sdk verify s9pk $(PKG_ID).s9pk
|
|
|
|
install: $(PKG_ID).s9pk
|
|
start-cli package install $(PKG_ID).s9pk
|
|
|
|
$(PKG_ID).s9pk: manifest.yaml instructions.md icon.png LICENSE scripts/embassy.js image.tar
|
|
start-sdk pack
|
|
|
|
scripts/embassy.js: $(TS_FILES)
|
|
deno run --allow-read --allow-write --allow-env --allow-net scripts/bundle.ts
|
|
|
|
image.tar: Dockerfile docker_entrypoint.sh
|
|
docker buildx build --tag start9/$(PKG_ID)/main:$(PKG_VERSION) \
|
|
--platform=linux/arm64/v8,linux/amd64 \
|
|
--build-arg ARCH=$(shell uname -m) \
|
|
-o type=oci,dest=image.tar .
|
|
|
|
clean:
|
|
rm -f $(PKG_ID).s9pk image.tar scripts/embassy.js
|
|
|
|
.PHONY: all verify install clean
|