Skip to content

Instantly share code, notes, and snippets.

@nyanloutre
Created November 22, 2016 11:27
Show Gist options
  • Save nyanloutre/651599cc7d231dc3d0fdee14bf55bbc7 to your computer and use it in GitHub Desktop.
Save nyanloutre/651599cc7d231dc3d0fdee14bf55bbc7 to your computer and use it in GitHub Desktop.
Bitcore Docker image
var config = {
basePath: '/bws/api',
disableLogs: false,
port: 3232,
// Uncomment to make BWS a forking server
// cluster: true,
// Uncomment to use the nr of availalbe CPUs
// clusterInstances: 4,
// https: true,
// privateKeyFile: 'private.pem',
// certificateFile: 'cert.pem',
////// The following is only for certs which are not
////// trusted by nodejs 'https' by default
////// CAs like Verisign do not require this
// CAinter1: '', // ex. 'COMODORSADomainValidationSecureServerCA.crt'
// CAinter2: '', // ex. 'COMODORSAAddTrustCA.crt'
// CAroot: '', // ex. 'AddTrustExternalCARoot.crt'
storageOpts: {
mongoDb: {
uri: 'mongodb://mongo:27017/bws',
},
},
lockOpts: {
// To use locker-server, uncomment this:
lockerServer: {
host: 'localhost',
port: 3231,
},
},
messageBrokerOpts: {
// To use message broker server, uncomment this:
messageBrokerServer: {
url: 'http://localhost:3380',
},
},
blockchainExplorerOpts: {
livenet: {
provider: 'insight',
url: 'https://insight.bitpay.com:443',
},
testnet: {
provider: 'insight',
url: 'https://test-insight.bitpay.com:443',
// url: 'http://localhost:3001',
// Multiple servers (in priority order)
// url: ['http://a.b.c', 'https://test-insight.bitpay.com:443'],
},
},
pushNotificationsOpts: {
templatePath: './lib/templates',
defaultLanguage: 'en',
defaultUnit: 'btc',
subjectPrefix: '',
pushServerUrl: 'http://localhost:8000',
},
fiatRateServiceOpts: {
defaultProvider: 'BitPay',
fetchInterval: 60, // in minutes
},
// To use email notifications uncomment this:
// emailOpts: {
// host: 'localhost',
// port: 25,
// ignoreTLS: true,
// subjectPrefix: '[Wallet Service]',
// from: 'wallet-service@bitcore.io',
// templatePath: './lib/templates',
// defaultLanguage: 'en',
// defaultUnit: 'btc',
// publicTxUrlTemplate: {
// livenet: 'https://insight.bitpay.com/tx/{{txid}}',
// testnet: 'https://test-insight.bitpay.com/tx/{{txid}}',
// },
//},
//
// To use sendgrid:
// var sgTransport = require('nodemail-sendgrid-transport');
// mailer:sgTransport({
// api_user: xxx,
// api_key: xxx,
// });
};
module.exports = config;
FROM node:4
RUN apt-get update && \
apt-get install libzmq3-dev build-essential libkrb5-dev -y && \
apt-get clean && \
npm install -g bitcore && \
bitcore create mynode && \
cd mynode && \
bitcore install bitcore-wallet-service && \
bitcore install insight-api && \
bitcore install insight-ui
COPY config.js /mynode/node_modules/bitcore-wallet-service/config.js
WORKDIR /mynode
ENTRYPOINT bitcored
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment