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) {
|
||||
return `docker swarm join --token ${token} ${captainIpAddress}:2377`
|
||||
createJoinCommand(
|
||||
captainIpAddress: string,
|
||||
token: string,
|
||||
workerIp: string
|
||||
) {
|
||||
return `docker swarm join --token ${token} ${captainIpAddress}:2377 --advertise-addr ${workerIp}:2377`
|
||||
}
|
||||
|
||||
getNodesInfo() {
|
||||
|
||||
@@ -40,7 +40,8 @@ export default class DockerUtils {
|
||||
CaptainConstants.disableFirewallCommand
|
||||
} ${dockerApi.createJoinCommand(
|
||||
captainIpAddress,
|
||||
token
|
||||
token,
|
||||
remoteNodeIpAddress
|
||||
)}`,
|
||||
function (err, stream) {
|
||||
if (err) {
|
||||
|
||||
Reference in New Issue
Block a user