diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-10-19 21:00:55 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2017-11-21 21:09:33 +0800 |
commit | da3b9f831e6bb8f8a3c589e5cd8426fd9da72eea (patch) | |
tree | fb9cca2507788d43e79113a42d9abc3e221e6378 /cmd/puppeth/module_node.go | |
parent | 7b258c96816df56e642df7e314e8052213af70fa (diff) | |
download | go-tangerine-da3b9f831e6bb8f8a3c589e5cd8426fd9da72eea.tar go-tangerine-da3b9f831e6bb8f8a3c589e5cd8426fd9da72eea.tar.gz go-tangerine-da3b9f831e6bb8f8a3c589e5cd8426fd9da72eea.tar.bz2 go-tangerine-da3b9f831e6bb8f8a3c589e5cd8426fd9da72eea.tar.lz go-tangerine-da3b9f831e6bb8f8a3c589e5cd8426fd9da72eea.tar.xz go-tangerine-da3b9f831e6bb8f8a3c589e5cd8426fd9da72eea.tar.zst go-tangerine-da3b9f831e6bb8f8a3c589e5cd8426fd9da72eea.zip |
cmd/puppeth: support deploying services with forced rebuilds
Diffstat (limited to 'cmd/puppeth/module_node.go')
-rw-r--r-- | cmd/puppeth/module_node.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cmd/puppeth/module_node.go b/cmd/puppeth/module_node.go index ad50cd80a..17e8a1a99 100644 --- a/cmd/puppeth/module_node.go +++ b/cmd/puppeth/module_node.go @@ -81,7 +81,7 @@ services: // deployNode deploys a new Ethereum node container to a remote machine via SSH, // docker and docker-compose. If an instance with the specified network name // already exists there, it will be overwritten! -func deployNode(client *sshClient, network string, bootv4, bootv5 []string, config *nodeInfos) ([]byte, error) { +func deployNode(client *sshClient, network string, bootv4, bootv5 []string, config *nodeInfos, nocache bool) ([]byte, error) { kind := "sealnode" if config.keyJSON == "" && config.etherbase == "" { kind = "bootnode" @@ -143,7 +143,10 @@ func deployNode(client *sshClient, network string, bootv4, bootv5 []string, conf defer client.Run("rm -rf " + workdir) // Build and deploy the boot or seal node service - return nil, client.Stream(fmt.Sprintf("cd %s && docker-compose -p %s up -d --build", workdir, network)) + if nocache { + return nil, client.Stream(fmt.Sprintf("cd %s && docker-compose -p %s build --pull --no-cache && docker-compose -p %s up -d --force-recreate", workdir, network, network)) + } + return nil, client.Stream(fmt.Sprintf("cd %s && docker-compose -p %s up -d --build --force-recreate", workdir, network)) } // nodeInfos is returned from a boot or seal node status check to allow reporting |