|
|
@@ -437,7 +437,7 @@ services:
|
|
|
// deployDashboard deploys a new dashboard 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 deployDashboard(client *sshClient, network string, port int, vhost string, services map[string]string, conf *config, ethstats bool) ([]byte, error) {
|
|
|
+func deployDashboard(client *sshClient, network string, port int, vhost string, services map[string]string, conf *config, ethstats bool, nocache bool) ([]byte, error) {
|
|
|
// Generate the content to upload to the server
|
|
|
workdir := fmt.Sprintf("%d", rand.Int63())
|
|
|
files := make(map[string][]byte)
|
|
|
@@ -490,7 +490,10 @@ func deployDashboard(client *sshClient, network string, port int, vhost string,
|
|
|
defer client.Run("rm -rf " + workdir)
|
|
|
|
|
|
// Build and deploy the dashboard 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))
|
|
|
}
|
|
|
|
|
|
// dashboardInfos is returned from an dashboard status check to allow reporting
|