added opentimestamps feature to configtool

This commit is contained in:
jash
2018-11-13 23:57:55 +01:00
committed by kexkey
parent 3d9df19602
commit 7f45d7940e
5 changed files with 34 additions and 0 deletions

View File

@@ -2,5 +2,9 @@
{
"name": "Lightning node",
"value": "lightning"
},
{
"name": "Opentimestamps client",
"value": "opentimestamps"
}
]

View File

@@ -354,6 +354,7 @@ module.exports = class extends Generator {
lightning_datapath: '',
lightning_nodename: '',
lightning_nodecolor: '',
opentimestamps_datapath: '',
installer_cleanup: false
}, this.props );
this.props.default_username = process.env.DEFAULT_USER || '';

View File

@@ -76,6 +76,15 @@ module.exports = {
validate: utils._pathValidator,
message: prefix()+'Where is your lightning node data?'+utils._getHelp('lightning_datapath'),
},
{
when: function(props) { return installerDocker(props) && props.features.indexOf('opentimestamps') !== -1 },
type: 'input',
name: 'opentimestamps_datapath',
default: utils._getDefault( 'opentimestamps_datapath' ),
filter: utils._trimFilter,
validate: utils._pathValidator,
message: prefix()+'Where is your opentimestamps data?'+utils._getHelp('opentimestamps_datapath'),
},
{
when: function(props) { return installerDocker(props) && props.bitcoin_mode === 'internal' },
type: 'confirm',

View File

@@ -1,9 +1,11 @@
INSTALLER_MODE=<%= installer_mode %>
BITCOIN_INTERNAL=<%= (bitcoin_mode==="internal"?'true':'false') %>
FEATURE_LIGHTNING=<%= (features.indexOf('lightning') != -1)?'true':'false' %>
FEATURE_OPENTIMESTAMPS=<%= (features.indexOf('opentimestamps') != -1)?'true':'false' %>
LIGHTNING_IMPLEMENTATION=<%= lightning_implementation %>
BITCOIN_DATAPATH=<%= bitcoin_datapath %>
LIGHTNING_DATAPATH=<%= lightning_datapath %>
OPENTIMESTAMPS_DATAPATH=<%= opentimestamps_datapath %>
PROXY_DATAPATH=<%= proxy_datapath %>
GATEKEEPER_DATAPATH=<%= gatekeeper_datapath %>
DOCKER_MODE=<%= docker_mode %>

View File

@@ -48,6 +48,7 @@ services:
volumes:
- "<%= proxy_datapath %>:/proxy/db"
- "<%= lightning_datapath %>:/proxy/.lightning"
- "<%= opentimestamps_datapath %>:/otsfiles"
# deploy:
# placement:
# constraints: [node.hostname==dev]
@@ -100,6 +101,23 @@ services:
- cyphernodenet
restart: always
<% } %>
<% if ( features.indexOf('opentimestamps') !== -1 ) { %>
opentimestamps:
environment:
- "TRACING=1"
- "OTSCLIENT_LISTENING_PORT=6666"
image: cyphernode/opentimestamps
# deploy:
# placement:
# constraints: [node.hostname==dev]
volumes:
- "<%= opentimestamps_datapath%>:/otsfiles"
command: $USER /script/startotsclient.sh
networks:
- cyphernodenet
restart: always
<% } %>
<% if( bitcoin_mode === 'internal' ) { %>
bitcoin:
command: $USER bitcoind