mirror of
https://github.com/aljazceru/cyphernode.git
synced 2026-01-19 20:44:21 +01:00
200 lines
5.9 KiB
YAML
200 lines
5.9 KiB
YAML
version: "3"
|
|
|
|
services:
|
|
gatekeeper:
|
|
# HTTP authentication API gate
|
|
environment:
|
|
- "TRACING=1"
|
|
image: cyphernode/gatekeeper:<%= gatekeeper_version %>
|
|
ports:
|
|
- "<%= gatekeeper_port %>:443"
|
|
volumes:
|
|
- "<%= gatekeeper_datapath %>/certs:/etc/ssl/certs"
|
|
- "<%= gatekeeper_datapath %>/private:/etc/ssl/private"
|
|
- "<%= gatekeeper_datapath %>/keys.properties:/etc/nginx/conf.d/keys.properties"
|
|
- "<%= gatekeeper_datapath %>/api.properties:/etc/nginx/conf.d/api.properties"
|
|
- "<%= gatekeeper_datapath %>/htpasswd:/etc/nginx/conf.d/status/htpasswd"
|
|
- "<%= gatekeeper_datapath %>/installation.json:/etc/nginx/conf.d/s/stats/installation.json"
|
|
- "<%= gatekeeper_datapath %>/client.7z:/etc/nginx/conf.d/s/stats/client.7z"
|
|
- "<%= gatekeeper_datapath %>/config.7z:/etc/nginx/conf.d/s/stats/config.7z"
|
|
command: $USER
|
|
|
|
# deploy:
|
|
# placement:
|
|
# constraints: [node.hostname==dev]
|
|
networks:
|
|
- cyphernodenet
|
|
- cyphernodeappsnet
|
|
restart: always
|
|
|
|
traefik:
|
|
image: traefik:v1.7.9-alpine
|
|
restart: always
|
|
ports:
|
|
- 80:80
|
|
- 443:443
|
|
# deploy:
|
|
# placement:
|
|
# constraints: [node.hostname==dev]
|
|
volumes:
|
|
- "/var/run/docker.sock:/var/run/docker.sock"
|
|
- "<%= traefik_datapath%>/traefik.toml:/traefik.toml"
|
|
- "<%= traefik_datapath%>/acme.json:/acme.json"
|
|
- "<%= traefik_datapath%>/htpasswd:/htpasswd/htpasswd"
|
|
networks:
|
|
- cyphernodeappsnet
|
|
|
|
proxy:
|
|
command: $USER ./startproxy.sh
|
|
# Bitcoin Mini Proxy
|
|
environment:
|
|
- "TRACING=1"
|
|
- "WATCHER_BTC_NODE_RPC_URL=<%= (bitcoin_mode === 'internal')?'bitcoin':bitcoin_node_ip %>:<%= (net === 'mainnet')?'8332':'18332' %>/wallet"
|
|
- "WATCHER_BTC_NODE_DEFAULT_WALLET=watching01.dat"
|
|
- "WATCHER_BTC_NODE_XPUB_WALLET=xpubwatching01.dat"
|
|
- "WATCHER_BTC_NODE_RPC_USER=<%= bitcoin_rpcuser %>:<%= bitcoin_rpcpassword %>"
|
|
- "WATCHER_BTC_NODE_RPC_CFG=/tmp/watcher_btcnode_curlcfg.properties"
|
|
- "SPENDER_BTC_NODE_RPC_URL=<%= (bitcoin_mode === 'internal')?'bitcoin':bitcoin_node_ip %>:<%= (net === 'mainnet')?'8332':'18332' %>/wallet"
|
|
- "SPENDER_BTC_NODE_DEFAULT_WALLET=spending01.dat"
|
|
- "SPENDER_BTC_NODE_RPC_USER=<%= bitcoin_rpcuser %>:<%= bitcoin_rpcpassword %>"
|
|
- "SPENDER_BTC_NODE_RPC_CFG=/tmp/spender_btcnode_curlcfg.properties"
|
|
- "PROXY_LISTENING_PORT=8888"
|
|
- "DB_PATH=/proxy/db"
|
|
- "DB_FILE=/proxy/db/proxydb"
|
|
- "PYCOIN_CONTAINER=pycoin:7777"
|
|
<% if ( use_xpub && xpub ) { %>
|
|
- "DERIVATION_PUB32=<%= xpub %>"
|
|
- "DERIVATION_PATH=<%= derivation_path %>"
|
|
<% } %>
|
|
- "WATCHER_BTC_NODE_PRUNED=<%= bitcoin_prune?'true':'false' %>"
|
|
- "OTSCLIENT_CONTAINER=otsclient:6666"
|
|
- "OTS_FILES=/proxy/otsfiles"
|
|
- "XPUB_DERIVATION_GAP=100"
|
|
image: cyphernode/proxy:<%= proxy_version %>
|
|
<% if ( devmode ) { %>
|
|
ports:
|
|
- "8888:8888"
|
|
<% } %>
|
|
volumes:
|
|
- "<%= proxy_datapath %>:/proxy/db"
|
|
<% if ( features.indexOf('lightning') !== -1 && lightning_implementation === 'c-lightning' ) { %>
|
|
- "<%= lightning_datapath %>:/.lightning"
|
|
<% } %>
|
|
<% if ( features.indexOf('otsclient') !== -1 ) { %>
|
|
- "<%= otsclient_datapath %>:/proxy/otsfiles"
|
|
<% } %>
|
|
|
|
# deploy:
|
|
# placement:
|
|
# constraints: [node.hostname==dev]
|
|
networks:
|
|
- cyphernodenet
|
|
restart: always
|
|
proxycron:
|
|
environment:
|
|
- "TX_CONF_URL=proxy:8888/executecallbacks"
|
|
- "OTS_URL=proxy:8888/ots_backoffice"
|
|
image: cyphernode/proxycron:<%= proxycron_version %>
|
|
# deploy:
|
|
# placement:
|
|
# constraints: [node.hostname==dev]
|
|
networks:
|
|
- cyphernodenet
|
|
restart: always
|
|
pycoin:
|
|
# Pycoin
|
|
command: $USER ./startpycoin.sh
|
|
image: cyphernode/pycoin:<%= pycoin_version %>
|
|
environment:
|
|
- "TRACING=1"
|
|
- "PYCOIN_LISTENING_PORT=7777"
|
|
<% if ( devmode ) { %>
|
|
ports:
|
|
- "7777:7777"
|
|
<% } %>
|
|
# deploy:
|
|
# placement:
|
|
# constraints: [node.hostname==dev]
|
|
networks:
|
|
- cyphernodenet
|
|
restart: always
|
|
<% if ( features.indexOf('lightning') !== -1 && lightning_implementation === 'c-lightning' ) { %>
|
|
lightning:
|
|
command: $USER lightningd
|
|
image: cyphernode/clightning:<%= lightning_version %>
|
|
|
|
<% if( lightning_expose ) { %>
|
|
ports:
|
|
- "9735:9735"
|
|
<% } %>
|
|
volumes:
|
|
- "<%= lightning_datapath %>:/.lightning"
|
|
- "<%= lightning_datapath %>/bitcoin.conf:/.bitcoin/bitcoin.conf"
|
|
# deploy:
|
|
# placement:
|
|
# constraints: [node.hostname==dev]
|
|
networks:
|
|
- cyphernodenet
|
|
restart: always
|
|
|
|
<% } %>
|
|
<% if ( features.indexOf('otsclient') !== -1 ) { %>
|
|
otsclient:
|
|
environment:
|
|
- "TRACING=1"
|
|
- "OTSCLIENT_LISTENING_PORT=6666"
|
|
image: cyphernode/otsclient:<%= otsclient_version %>
|
|
# deploy:
|
|
# placement:
|
|
# constraints: [node.hostname==dev]
|
|
volumes:
|
|
- "<%= otsclient_datapath %>:/otsfiles"
|
|
command: $USER /script/startotsclient.sh
|
|
networks:
|
|
- cyphernodenet
|
|
restart: always
|
|
<% } %>
|
|
|
|
<% if( bitcoin_mode === 'internal' ) { %>
|
|
bitcoin:
|
|
command: $USER bitcoind
|
|
image: cyphernode/bitcoin:<%= bitcoin_version %>
|
|
<% if( bitcoin_expose ) { %>
|
|
ports:
|
|
- "<%= (net === 'mainnet')?'8332:8332':'18332:18332' %>"
|
|
<% } %>
|
|
# deploy:
|
|
# placement:
|
|
# constraints: [node.hostname==dev]
|
|
volumes:
|
|
- "<%= bitcoin_datapath %>:/.bitcoin"
|
|
networks:
|
|
- cyphernodenet
|
|
restart: always
|
|
<% } %>
|
|
|
|
broker:
|
|
image: eclipse-mosquitto:1.6
|
|
# deploy:
|
|
# placement:
|
|
# constraints: [node.hostname==dev]
|
|
networks:
|
|
- cyphernodenet
|
|
restart: always
|
|
|
|
notifier:
|
|
image: cyphernode/notifier:<%= notifier_version %>
|
|
command: $USER ./startnotifier.sh
|
|
# deploy:
|
|
# placement:
|
|
# constraints: [node.hostname==dev]
|
|
networks:
|
|
- cyphernodenet
|
|
- cyphernodeappsnet
|
|
restart: always
|
|
|
|
networks:
|
|
cyphernodenet:
|
|
external: true
|
|
cyphernodeappsnet:
|
|
external: true |