-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactored for x86_64 architecture * updated to v0.1.4 * bugfixes Co-authored-by: islandbitcoin <[email protected]>
- Loading branch information
1 parent
51b273b
commit a2858ff
Showing
23 changed files
with
114 additions
and
874 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
jam.s9pk | ||
image.tar | ||
scripts/*.js | ||
scripts/*.js | ||
docker-images/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +0,0 @@ | ||
[submodule "jam-docker"] | ||
path = jam-docker | ||
url = https://github.com/joinmarket-webui/jam-docker.git | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,22 @@ | ||
FROM ghcr.io/joinmarket-webui/jam-standalone:latest | ||
RUN apt-get update && apt-get install -qq --no-install-recommends wget bash | ||
RUN wget https://github.com/mikefarah/yq/releases/download/v4.12.2/yq_linux_arm.tar.gz -O - |\ | ||
tar xz && mv yq_linux_arm /usr/bin/yq | ||
FROM ghcr.io/joinmarket-webui/jam-standalone:v0.1.4-clientserver-v0.9.8 | ||
|
||
USER root | ||
# arm64 or amd64 | ||
ARG PLATFORM | ||
# aarch64 or x86_64 | ||
ARG ARCH | ||
|
||
RUN apt-get update && apt-get install -qq --no-install-recommends wget bash tini | ||
RUN wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_${PLATFORM} && chmod +x /usr/local/bin/yq | ||
|
||
# USER root | ||
|
||
ENV DATADIR /root/.joinmarket | ||
ENV CONFIG ${DATADIR}/joinmarket.cfg | ||
ENV DEFAULT_CONFIG /default.cfg | ||
ENV JM_RPC_HOST="bitcoind.embassy" | ||
ENV JM_RPC_PORT="8332" | ||
ENV JM_RPC_USER="bitcoin" | ||
ENV JM_RPC_PASSWORD= | ||
ENV APP_USER "joinmarket" | ||
ENV APP_PASSWORD "joinmarket" | ||
ENV ENSURE_WALLET true | ||
ENV JM_NETWORK mainnet | ||
|
||
ENV REMOVE_LOCK_FILES true | ||
ENV RESTORE_DEFAULT_CONFIG true | ||
|
||
ADD jam-docker/standalone/nginx/ /nginx/ | ||
ADD jam-docker/standalone/default.cfg / | ||
ADD jam-docker/standalone/torrc / | ||
|
||
RUN chmod a+x /default.cfg | ||
RUN chmod a+x /torrc | ||
|
||
ADD docker_entrypoint.sh /usr/local/bin/docker_entrypoint.sh | ||
ADD assets/utils/check-web.sh /usr/local/bin/check-web.sh | ||
ADD assets/utils/check-api.sh /usr/local/bin/check-api.sh | ||
ADD actions/unlock-wallet.sh /usr/local/bin/unlock-wallet.sh | ||
RUN chmod a+x /usr/local/bin/*.sh | ||
|
||
EXPOSE 80 28183 27183 8080 | ||
|
||
ENTRYPOINT ["/usr/local/bin/docker_entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,35 @@ | ||
ASSETS := $(shell yq e '.assets.[].src' manifest.yaml) | ||
ASSET_PATHS := $(addprefix assets/,$(ASSETS)) | ||
VERSION := $(shell yq e ".version" manifest.yaml) | ||
S9PK_PATH=$(shell find . -name jam.s9pk -print) | ||
PKG_ID := $(shell yq e ".id" manifest.yaml) | ||
PKG_VERSION := $(shell yq e ".version" manifest.yaml) | ||
TS_FILES := $(shell find ./ -name \*.ts) | ||
|
||
# delete the target of a rule if it has changed and its recipe exits with a nonzero exit status | ||
.DELETE_ON_ERROR: | ||
|
||
all: verify | ||
|
||
verify: jam.s9pk $(S9PK_PATH) | ||
embassy-sdk verify s9pk $(S9PK_PATH) | ||
verify: $(PKG_ID).s9pk | ||
embassy-sdk verify s9pk $(PKG_ID).s9pk | ||
|
||
install: all | ||
embassy-cli package install jam.s9pk | ||
install: $(PKG_ID).s9pk | ||
embassy-cli package install $(PKG_ID).s9pk | ||
|
||
clean: | ||
rm -f jam.s9pk | ||
rm -rf docker-images | ||
rm -f image.tar | ||
rm -f $(PKG_ID).s9pk | ||
rm -f scripts/*.js | ||
|
||
jam.s9pk: manifest.yaml assets/compat/* image.tar scripts/embassy.js docs/instructions.md $(ASSET_PATHS) | ||
embassy-sdk pack | ||
scripts/embassy.js: $(TS_FILES) | ||
deno bundle scripts/embassy.ts scripts/embassy.js | ||
|
||
image.tar: Dockerfile docker_entrypoint.sh assets/utils/* | ||
DOCKER_CLI_EXPERIMENTAL=enabled docker buildx build --tag start9/jam/main:$(VERSION) --platform=linux/arm64 -o type=docker,dest=image.tar . | ||
docker-images/x86_64.tar: Dockerfile docker_entrypoint.sh assets/utils/* | ||
mkdir -p docker-images | ||
docker buildx build --tag start9/$(PKG_ID)/main:$(PKG_VERSION) --platform=linux/amd64 --build-arg PLATFORM=amd64 -o type=docker,dest=docker-images/x86_64.tar . | ||
|
||
scripts/embassy.js: scripts/**/*.ts | ||
deno bundle scripts/embassy.ts scripts/embassy.js | ||
docker-images/aarch64.tar: Dockerfile docker_entrypoint.sh assets/utils/* | ||
mkdir -p docker-images | ||
docker buildx build --tag start9/$(PKG_ID)/main:$(PKG_VERSION) --platform=linux/arm64 --build-arg PLATFORM=arm64 -o type=docker,dest=docker-images/aarch64.tar . | ||
|
||
$(PKG_ID).s9pk: manifest.yaml instructions.md LICENSE icon.png scripts/embassy.js docker-images/aarch64.tar docker-images/x86_64.tar | ||
if ! [ -z "$(ARCH)" ]; then cp docker-images/$(ARCH).tar image.tar; fi | ||
embassy-sdk pack |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
#!/bin/bash | ||
|
||
DURATION=$(</dev/stdin) | ||
if (($DURATION <= 8000)); then | ||
if (($DURATION <= 5000)); then | ||
echo "JAM Web API may take a while to start, please be patient..." | ||
exit 60 | ||
else | ||
if ! curl -sSL --silent --fail --insecure https://jam.embassy:28183/api/v1/session &>/dev/null; then | ||
if ! curl -SL --silent --fail --insecure --max-time 10 https://jam.embassy:28183/api/v1/session 2>/dev/null; then | ||
echo "JAM API is unreachable" >&2 | ||
exit 1 | ||
exit 61 | ||
fi | ||
fi |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.