diff --git a/install/generator-cyphernode/generators/app/help.json b/install/generator-cyphernode/generators/app/help.json
index a1a6b52..dcb3378 100644
--- a/install/generator-cyphernode/generators/app/help.json
+++ b/install/generator-cyphernode/generators/app/help.json
@@ -33,6 +33,7 @@
"lightning_nodecolor": "LN nodes have colors. Choose the color you want for yours in RGB format (RRGGBB). For example, pure red would be ff0000.",
"lightning_datapath": "Path name to where LN's data files are stored. This directory will be mounted into the LN node's container.",
"lightning_datapath_custom": " ",
+ "lightning_expose": "By default, LN node port will be published outside of Docker. Do you want to hide it so that your node can't be accessed from outside of the Docker network?",
"otsclient_datapath": "Full path where the OTS files will be stored. This path will be mounted into the otsclient container which will create the OTS files when stamping and update them when upgrading stamps. It will also be mounted to the proxy container so that it can serve the ots_getfile and send the OTS files to clients.",
"otsclient_datapath_custom": " ",
"installer_mode": "Only one installation mode is supported, right now: local docker (self-hosted). Choose wisely ;-)",
diff --git a/install/generator-cyphernode/generators/app/index.js b/install/generator-cyphernode/generators/app/index.js
index 51ea22b..177d453 100644
--- a/install/generator-cyphernode/generators/app/index.js
+++ b/install/generator-cyphernode/generators/app/index.js
@@ -388,6 +388,7 @@ module.exports = class extends Generator {
bitcoin_node_ip: '',
bitcoin_mode: 'internal',
bitcoin_expose: false,
+ lightning_expose: true,
gatekeeper_apiproperties: defaultAPIProperties,
gatekeeper_ipwhitelist: '',
gatekeeper_keys: { configEntries: [], clientInformation: [] },
diff --git a/install/generator-cyphernode/generators/app/prompters/999_installer.js b/install/generator-cyphernode/generators/app/prompters/999_installer.js
index d6ef062..aca41c1 100644
--- a/install/generator-cyphernode/generators/app/prompters/999_installer.js
+++ b/install/generator-cyphernode/generators/app/prompters/999_installer.js
@@ -207,6 +207,13 @@ module.exports = {
default: utils._getDefault( 'bitcoin_expose' ),
message: prefix()+'Expose bitcoin full node outside of the docker network?'+utils._getHelp('bitcoin_expose'),
},
+ {
+ when: function(props) { return installerDocker(props) && props.features.indexOf('lightning') !== -1 },
+ type: 'confirm',
+ name: 'lightning_expose',
+ default: utils._getDefault( 'lightning_expose' ),
+ message: prefix()+'Expose lightning node outside of the docker network?'+utils._getHelp('lightning_expose'),
+ },
{
when: installerDocker,
type: 'list',
diff --git a/install/generator-cyphernode/generators/app/templates/installer/docker/docker-compose.yaml b/install/generator-cyphernode/generators/app/templates/installer/docker/docker-compose.yaml
index 7f1220b..d39a559 100644
--- a/install/generator-cyphernode/generators/app/templates/installer/docker/docker-compose.yaml
+++ b/install/generator-cyphernode/generators/app/templates/installer/docker/docker-compose.yaml
@@ -99,8 +99,10 @@ services:
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"