mirror of
https://github.com/aljazceru/cyphernode.git
synced 2025-12-26 00:55:08 +01:00
added "expose" option to installer and template
This commit is contained in:
@@ -4,11 +4,19 @@ const chalk = require('chalk');
|
||||
const name = 'installer';
|
||||
|
||||
const installerDocker = function(props) {
|
||||
return props.installer === 'docker'
|
||||
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 === 'lunanode'
|
||||
return props.installer_mode === 'lunanode'
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
@@ -35,9 +43,7 @@ module.exports = {
|
||||
}]
|
||||
},
|
||||
{
|
||||
when: function(props) {
|
||||
return (installerDocker(props) && props.bitcoin_mode === 'internal')
|
||||
},
|
||||
when: installerDocker_bitcoinInternal,
|
||||
type: 'confirm',
|
||||
name: 'bitcoin_expose',
|
||||
default: utils._getDefault( 'bitcoin_expose' ),
|
||||
@@ -49,8 +55,7 @@ module.exports = {
|
||||
name: 'installer_confirm_lunanode',
|
||||
default: utils._getDefault( 'installer_confirm_lunanode' ),
|
||||
message: 'Lunanode?! No wayyyy!'+'\n'
|
||||
}
|
||||
];
|
||||
}];
|
||||
},
|
||||
templates: function( props ) {
|
||||
if( props.installer_mode === 'docker' ) {
|
||||
|
||||
@@ -77,12 +77,10 @@ services:
|
||||
bitcoin:
|
||||
# Bitcoin node
|
||||
image: cyphernode/bitcoin
|
||||
# ports:
|
||||
# - "18333:18333"
|
||||
# - "18332:18332"
|
||||
# - "29000:29000"
|
||||
# - "8333:8333"
|
||||
# - "8332:8332"
|
||||
<% if( bitcoin_expose ) { %>
|
||||
ports:
|
||||
- "<%= (net === 'mainnet')?'8332:8332':'18332:18332' %>"
|
||||
<% } %>
|
||||
volumes:
|
||||
- "~/.bitcoin:/bitcoinuser/.bitcoin"
|
||||
networks:
|
||||
|
||||
Reference in New Issue
Block a user