From 929a428ed19ccab9048f69750cd430828ea11005 Mon Sep 17 00:00:00 2001 From: zontreck Date: Sun, 9 Feb 2025 20:35:26 -0700 Subject: [PATCH] Add more stuff --- Jenkinsfile | 8 +++++--- bitcoin/{ => core}/Dockerfile | 0 bitcoin/{ => core}/entrypoint.sh | 0 bitcoin/explorer/Dockerfile | 22 ++++++++++++++++++++++ bitcoin/explorer/entrypoint.sh | 6 ++++++ 5 files changed, 33 insertions(+), 3 deletions(-) rename bitcoin/{ => core}/Dockerfile (100%) rename bitcoin/{ => core}/entrypoint.sh (100%) create mode 100644 bitcoin/explorer/Dockerfile create mode 100644 bitcoin/explorer/entrypoint.sh diff --git a/Jenkinsfile b/Jenkinsfile index a683c25..73e311d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -246,7 +246,7 @@ pipeline { stage("Build Blockchains") { agent { - label 'linux' + label 'dockermain' } steps { @@ -254,7 +254,8 @@ pipeline { sh ''' #!/bin/bash - docker build -t git.zontreck.com/zontreck/bitcoin:latest bitcoin + docker build -t git.zontreck.com/zontreck/bitcoin:latest bitcoin/core + docker build -t git.zontreck.com/zontreck/bitcoin:explorer bitcoin/explorer ''' } } @@ -262,7 +263,7 @@ pipeline { stage("Push Blockchains") { agent { - label 'linux' + label 'dockermain' } steps { @@ -271,6 +272,7 @@ pipeline { #!/bin/bash docker push git.zontreck.com/zontreck/bitcoin:latest + docker push git.zontreck.com/zontreck/bitcoin:explorer ''' } } diff --git a/bitcoin/Dockerfile b/bitcoin/core/Dockerfile similarity index 100% rename from bitcoin/Dockerfile rename to bitcoin/core/Dockerfile diff --git a/bitcoin/entrypoint.sh b/bitcoin/core/entrypoint.sh similarity index 100% rename from bitcoin/entrypoint.sh rename to bitcoin/core/entrypoint.sh diff --git a/bitcoin/explorer/Dockerfile b/bitcoin/explorer/Dockerfile new file mode 100644 index 0000000..69557ad --- /dev/null +++ b/bitcoin/explorer/Dockerfile @@ -0,0 +1,22 @@ +FROM git.zontreck.com/ariascreations/buildenvironments:debianbuild + +USER root +WORKDIR /root + +RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash +RUN source /root/.nvm/nvm.sh + +RUN nvm install v20 + +WORKDIR /app +RUN git clone https://github.com/janoside/btc-rpc-explorer explorer +WORKDIR /app/explorer + +RUN npm install + +EXPOSE 3002 +WORKDIR / +ADD ./entrypoint.sh /entrypoint.sh +RUN chmod +x entrypoint.sh + +ENTRYPOINT [ "/bin/bash", "/entrypoint.sh" ] \ No newline at end of file diff --git a/bitcoin/explorer/entrypoint.sh b/bitcoin/explorer/entrypoint.sh new file mode 100644 index 0000000..3d26923 --- /dev/null +++ b/bitcoin/explorer/entrypoint.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +cd /app/explorer +source ~/.nvm/nvm.sh + +npm start \ No newline at end of file