added bitcoin and lightning volume prompts and template entries

This commit is contained in:
jash
2018-10-08 15:38:56 +02:00
committed by kexkey
parent 9b979ed4eb
commit 92ee841edc
3 changed files with 24 additions and 11 deletions

View File

@@ -95,6 +95,11 @@ module.exports = class extends Generator {
return true;
}
_pathValidator( p ) {
return true;
}
_derivationPathValidator( path ) {
return true;
}

View File

@@ -7,14 +7,6 @@ const installerDocker = function(props) {
return props.installer_mode === 'docker'
};
const installerDocker_bitcoinInternal = function(props) {
return props.installer_mode === 'docker' && props.bitcoin_mode === 'internal'
};
const installerDocker_bitcoinExternal = function(props) {
return props.installer_mode === 'docker' && props.bitcoin_mode === 'external'
};
const installerLunanode = function(props) {
return props.installer_mode === 'lunanode'
};
@@ -43,12 +35,28 @@ module.exports = {
}]
},
{
when: installerDocker_bitcoinInternal,
when: function(props) { return installerDocker(props) && props.bitcoin_mode === 'internal' },
type: 'confirm',
name: 'bitcoin_expose',
default: utils._getDefault( 'bitcoin_expose' ),
message: 'Expose bitcoin full node outside of the docker network?'+'\n',
},
{
when: function(props) { return installerDocker(props) && props.bitcoin_mode === 'internal' },
type: 'input',
name: 'bitcoin_datapath',
default: utils._getDefault( 'bitcoin_datapath' ),
validate: utils._pathValidator,
message: 'Where is your blockchain data?'+'\n',
},
{
when: function(props) { return installerDocker(props) && props.features.indexOf('lightning') !== -1 },
type: 'input',
name: 'lightning_datapath',
default: utils._getDefault( 'lightning_datapath' ),
validate: utils._pathValidator,
message: 'Where is your lightning node data?'+'\n',
},
{
when: installerLunanode,
type: 'confirm',

View File

@@ -64,7 +64,7 @@ services:
ports:
- "9735:9735"
volumes:
- "~/.lightning:/lnuser/.lightning"
- "<%= lightning_datapath%>:/lnuser/.lightning"
# deploy:
# placement:
# constraints: [node.hostname==dev]
@@ -82,7 +82,7 @@ services:
- "<%= (net === 'mainnet')?'8332:8332':'18332:18332' %>"
<% } %>
volumes:
- "~/.bitcoin:/bitcoinuser/.bitcoin"
- "<%= bitcoin_datapath%>:/bitcoinuser/.bitcoin"
networks:
- cyphernodenet
<% } %>