mirror of
https://github.com/caprover/caprover
synced 2025-12-12 06:15:40 +00:00
Added to advertise-addr docker swarm join command - Fixes https://github.com/caprover/caprover/issues/572
This commit is contained in:
@@ -163,8 +163,12 @@ class DockerApi {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
createJoinCommand(captainIpAddress: string, token: string) {
|
createJoinCommand(
|
||||||
return `docker swarm join --token ${token} ${captainIpAddress}:2377`
|
captainIpAddress: string,
|
||||||
|
token: string,
|
||||||
|
workerIp: string
|
||||||
|
) {
|
||||||
|
return `docker swarm join --token ${token} ${captainIpAddress}:2377 --advertise-addr ${workerIp}:2377`
|
||||||
}
|
}
|
||||||
|
|
||||||
getNodesInfo() {
|
getNodesInfo() {
|
||||||
|
|||||||
@@ -40,7 +40,8 @@ export default class DockerUtils {
|
|||||||
CaptainConstants.disableFirewallCommand
|
CaptainConstants.disableFirewallCommand
|
||||||
} ${dockerApi.createJoinCommand(
|
} ${dockerApi.createJoinCommand(
|
||||||
captainIpAddress,
|
captainIpAddress,
|
||||||
token
|
token,
|
||||||
|
remoteNodeIpAddress
|
||||||
)}`,
|
)}`,
|
||||||
function (err, stream) {
|
function (err, stream) {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|||||||
Reference in New Issue
Block a user