aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/puppeth/module_nginx.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/puppeth/module_nginx.go')
-rw-r--r--cmd/puppeth/module_nginx.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/cmd/puppeth/module_nginx.go b/cmd/puppeth/module_nginx.go
index 67084c80a..ade0e4963 100644
--- a/cmd/puppeth/module_nginx.go
+++ b/cmd/puppeth/module_nginx.go
@@ -55,7 +55,7 @@ services:
// deployNginx deploys a new nginx reverse-proxy container to expose one or more
// HTTP services running on a single host. If an instance with the specified
// network name already exists there, it will be overwritten!
-func deployNginx(client *sshClient, network string, port int) ([]byte, error) {
+func deployNginx(client *sshClient, network string, port int, nocache bool) ([]byte, error) {
log.Info("Deploying nginx reverse-proxy", "server", client.server, "port", port)
// Generate the content to upload to the server
@@ -79,8 +79,11 @@ func deployNginx(client *sshClient, network string, port int) ([]byte, error) {
}
defer client.Run("rm -rf " + workdir)
- // Build and deploy the ethstats service
- return nil, client.Stream(fmt.Sprintf("cd %s && docker-compose -p %s up -d --build", workdir, network))
+ // Build and deploy the reverse-proxy 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 up -d --build --force-recreate", workdir, network))
}
// nginxInfos is returned from an nginx reverse-proxy status check to allow