Add docker configs

This commit is contained in:
Steven Bower 2016-06-28 16:37:43 -07:00
parent adb7b28795
commit 8a7154f31f
No known key found for this signature in database
GPG Key ID: 53B6FEF7AAF4ACDF
4 changed files with 49 additions and 0 deletions

2
.dockerignore Normal file
View File

@ -0,0 +1,2 @@
node_modules/
docker_data/

1
.gitignore vendored
View File

@ -2,3 +2,4 @@ npm-debug.log
key.key
node_modules/
test.js
docker_data/

18
Dockerfile Normal file
View File

@ -0,0 +1,18 @@
FROM alpine:edge
MAINTAINER Steven Bower <steven@purse.io>
RUN apk update && \
apk upgrade
RUN apk add nodejs bash unrar git python build-base make
RUN mkdir /code /data
ADD . /code
WORKDIR /code
RUN npm install --production
RUN npm uninstall node-gyp
RUN apk del unrar git python build-base make && \
rm /var/cache/apk/*
CMD ["node", "/code/bin/node"]

28
docker-compose.yml Normal file
View File

@ -0,0 +1,28 @@
version: '2'
services:
bcoin:
build: .
ports:
#-- Mainnet
#- "8333:8333"
#- "8332:8332" # RPC
#-- Testnet
#- "18333:18333"
#- "18332:18332" # RPC
#-- SEGNET4
- "28901:28901"
- "28902:28902" # RPC
environment:
BCOIN_NETWORK: segnet4 # main, testnet
BCOIN_PREFIX: /data
networks:
- "bcoin"
volumes:
- ./docker_data:/data
networks:
bcoin:
external:
# docker network create bcoin
name: "bcoin"