-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ian Patton
committed
Sep 28, 2017
1 parent
1edd623
commit 6cca69a
Showing
10 changed files
with
152 additions
and
237 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.git | ||
node_modules | ||
Dockerfile |
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
FROM node:8 | ||
|
||
# update apt-get | ||
RUN apt-get update && apt-get install -y dnsutils | ||
|
||
USER root | ||
# Set up non root user | ||
RUN useradd --user-group --create-home --shell /bin/false ows | ||
|
||
# Setup environment variables | ||
ENV NODE_ENV=production | ||
ENV HOME_PATH=/home/ows | ||
|
||
ENV PKG_NAME=btccore-node | ||
ENV PKG_DIR=$HOME_PATH/$PKG_NAME | ||
|
||
ENV APP_NAME=bitcoin-core-services | ||
ENV APP_DIR=$HOME_PATH/$APP_NAME | ||
|
||
ENV BITCOIN_DATA=/data | ||
|
||
# Set up folder and add install files | ||
RUN mkdir -p $PKG_DIR | ||
RUN mkdir -p $BITCOIN_DATA | ||
COPY package.json $PKG_DIR | ||
WORKDIR $PKG_DIR | ||
|
||
RUN chown -R ows:ows $HOME_PATH | ||
RUN chgrp ows /usr/local/lib/node_modules | ||
RUN chgrp ows /usr/local/bin | ||
|
||
USER ows | ||
RUN npm install -g owstack/btccore-node | ||
|
||
WORKDIR $HOME_PATH | ||
RUN $PKG_NAME create -d $BITCOIN_DATA $APP_NAME | ||
WORKDIR $APP_DIR | ||
RUN $PKG_NAME install https://github.com/owstack/btccore-explorer-api.git | ||
RUN $PKG_NAME install https://github.com/owstack/btccore-wallet-service.git | ||
USER root | ||
CMD ["btccore-node","start"] |
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
version: '3.2' | ||
services: | ||
bitcoin-core-conf: | ||
build: extra/compose | ||
volumes: | ||
- bitcoin-core-data-dir:/data | ||
- btccore-conf-dir:/home/ows/config | ||
bitcoin-core: | ||
image: "owstack/bitcoin-core:0.14.1-ows" | ||
user: root | ||
command: "/usr/local/bin/bitcoind -datadir=/data" | ||
ports: | ||
- "8332:8332" | ||
- "8333:8333" | ||
- "18332:18332" | ||
- "18333:18333" | ||
- "28332:28332" | ||
- "28333:28333" | ||
volumes: | ||
- bitcoin-core-data-dir:/data | ||
depends_on: | ||
- "bitcoin-core-conf" | ||
ows-bitcoin-cash-node: | ||
build: . | ||
ports: | ||
- "3001:3001" | ||
depends_on: | ||
- "bitcoin-core" | ||
volumes: | ||
# - bitcoin-core-data-dir:/data | ||
- btccore-conf-dir:/home/ows/config | ||
command: "btccore-node start -c /home/ows/config" | ||
# command: "cat /home/ows/config/btccore-node.json" | ||
volumes: | ||
bitcoin-core-data-dir: | ||
btccore-conf-dir: |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM buildpack-deps:jessie | ||
MAINTAINER Ian Patton (ian.patton@gmail.com) | ||
|
||
ENV BITCOIN_DATA=/data | ||
ENV CONFIG_DIR=/home/ows/config | ||
|
||
RUN mkdir -p $BITCOIN_DATA | ||
RUN mkdir -p $CONFIG_DIR | ||
|
||
COPY default.bitcoin.conf $BITCOIN_DATA/bitcoin.conf | ||
COPY default.btccore-node.json $CONFIG_DIR/btccore-node.json | ||
|
||
CMD ["echo","installed config files"] |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
server=1 | ||
txindex=1 | ||
addressindex=1 | ||
timestampindex=1 | ||
spentindex=1 | ||
zmqpubrawtx=tcp://0.0.0.0:28332 | ||
zmqpubhashblock=tcp://0.0.0.0:28332 | ||
rpcallowip=0.0.0.0/0 | ||
rpcuser=bitcoin | ||
rpcpassword=local321 | ||
uacomment=bcccore |
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"network": "livenet", | ||
"port": 3001, | ||
"services": [ | ||
"explorer-api", | ||
"bitcoind", | ||
"web" | ||
], | ||
"servicesConfig": { | ||
"bitcoind": { | ||
"spawn": { | ||
"datadir": "/data", | ||
"exec": "/usr/local/lib/node_modules/btccore-node/bin/bitcoind" | ||
} | ||
}, | ||
"explorer-api": { | ||
"module": "btccore-explorer-api", | ||
"apiPrefix": "explorer-api" | ||
} | ||
} | ||
} |
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
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.