Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian Patton committed Sep 29, 2017
1 parent d548bfd commit 4ae3e65
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 16 deletions.
19 changes: 8 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,30 @@ RUN useradd --user-group --create-home --shell /bin/false ows

# Setup environment variables
ENV NODE_ENV=production
ENV PKG_NAME=btc-node
ENV APP_NAME=bitcoin-core-services
ENV HOME_PATH=/home/ows
ENV BITCOIN_DATA=/data

ENV PKG_NAME=btc-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
RUN mkdir -p $PKG_DIR && 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
RUN chown -R ows:ows $HOME_PATH && chgrp ows /usr/local/lib/node_modules && chgrp ows /usr/local/bin

USER ows
RUN npm install -g owstack/btc-node

WORKDIR $HOME_PATH
RUN $PKG_NAME create -d $BITCOIN_DATA $APP_NAME

WORKDIR $APP_DIR
RUN $PKG_NAME install https://github.com/owstack/btc-explorer-api.git
RUN $PKG_NAME install https://github.com/owstack/btc-wallet-service.git

USER root
CMD ["btc-node","start"]
CMD ["btcnode","start"]
4 changes: 1 addition & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,8 @@ services:
depends_on:
- "bitcoin-core"
volumes:
# - bitcoin-core-data-dir:/data
- btc-conf-dir:/home/ows/config
command: "btc-node start -c /home/ows/config"
# command: "cat /home/ows/config/btc-node.json"
command: "btcnode start -c /home/ows/config"
volumes:
bitcoin-core-data-dir:
btc-conf-dir:
4 changes: 2 additions & 2 deletions extra/compose/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ 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
RUN mkdir -p $BITCOIN_DATA && mkdir -p $CONFIG_DIR

COPY default.bitcoin.conf $BITCOIN_DATA/bitcoin.conf
COPY default.btc-node.json $CONFIG_DIR/btc-node.json
COPY default.btc-node.conf $CONFIG_DIR/btc-node.conf

CMD ["echo","installed config files"]

0 comments on commit 4ae3e65

Please sign in to comment.