cmd/puppeth: graceful shutdown on redeploys
This commit is contained in:
		| @@ -42,7 +42,7 @@ ADD genesis.json /genesis.json | ||||
| RUN \ | ||||
|   echo 'geth --cache 512 init /genesis.json' > geth.sh && \{{if .Unlock}} | ||||
| 	echo 'mkdir -p /root/.ethereum/keystore/ && cp /signer.json /root/.ethereum/keystore/' >> geth.sh && \{{end}} | ||||
| 	echo $'geth --networkid {{.NetworkID}} --cache 512 --port {{.Port}} --maxpeers {{.Peers}} {{.LightFlag}} --ethstats \'{{.Ethstats}}\' {{if .Bootnodes}}--bootnodes {{.Bootnodes}}{{end}} {{if .Etherbase}}--etherbase {{.Etherbase}} --mine --minerthreads 1{{end}} {{if .Unlock}}--unlock 0 --password /signer.pass --mine{{end}} --targetgaslimit {{.GasTarget}} --gasprice {{.GasPrice}}' >> geth.sh | ||||
| 	echo $'exec geth --networkid {{.NetworkID}} --cache 512 --port {{.Port}} --maxpeers {{.Peers}} {{.LightFlag}} --ethstats \'{{.Ethstats}}\' {{if .Bootnodes}}--bootnodes {{.Bootnodes}}{{end}} {{if .Etherbase}}--etherbase {{.Etherbase}} --mine --minerthreads 1{{end}} {{if .Unlock}}--unlock 0 --password /signer.pass --mine{{end}} --targetgaslimit {{.GasTarget}} --gasprice {{.GasPrice}}' >> geth.sh | ||||
|  | ||||
| ENTRYPOINT ["/bin/sh", "geth.sh"] | ||||
| ` | ||||
| @@ -139,9 +139,9 @@ func deployNode(client *sshClient, network string, bootnodes []string, config *n | ||||
|  | ||||
| 	// Build and deploy the boot or seal node service | ||||
| 	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 build --pull --no-cache && docker-compose -p %s up -d --force-recreate --timeout 60", workdir, network, network)) | ||||
| 	} | ||||
| 	return nil, client.Stream(fmt.Sprintf("cd %s && docker-compose -p %s up -d --build --force-recreate", workdir, network)) | ||||
| 	return nil, client.Stream(fmt.Sprintf("cd %s && docker-compose -p %s up -d --build --force-recreate --timeout 60", workdir, network)) | ||||
| } | ||||
|  | ||||
| // nodeInfos is returned from a boot or seal node status check to allow reporting | ||||
|   | ||||
		Reference in New Issue
	
	Block a user