mirror of
https://github.com/aljazceru/cyphernode.git
synced 2025-12-26 00:55:08 +01:00
added bitcoin and lightning volume prompts and template entries
This commit is contained in:
@@ -95,6 +95,11 @@ module.exports = class extends Generator {
|
||||
return true;
|
||||
}
|
||||
|
||||
_pathValidator( p ) {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
_derivationPathValidator( path ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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
|
||||
<% } %>
|
||||
|
||||
Reference in New Issue
Block a user