[satlab]: Upgrade Satlab containers in-place without need for reboot

Change-Id: I69b0f7ded7a08944b4d379c11742b8eea2ee0219
Bug:b:219549038a
Test: Manually tested on the local Satlab setup
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/satlab/+/3475680
Reviewed-by: Anh Le <anhdle@chromium.org>
Commit-Queue: Prasad Vuppalapu <prasadv@chromium.org>
Reviewed-by: Ivan Brovkovich <ivanbrovkovich@chromium.org>
Commit-Queue: Ivan Brovkovich <ivanbrovkovich@chromium.org>
Tested-by: Prasad Vuppalapu <prasadv@chromium.org>
diff --git a/os-dependent/chromeos/upstart-scripts/satlab-compose-down.conf b/os-dependent/chromeos/upstart-scripts/satlab-compose-down.conf
index b0ed165..50b5c05 100644
--- a/os-dependent/chromeos/upstart-scripts/satlab-compose-down.conf
+++ b/os-dependent/chromeos/upstart-scripts/satlab-compose-down.conf
@@ -24,7 +24,7 @@
   fi
 
   set -e
+  docker exec -i compose /compose_startup.sh down
   docker stop compose
   docker stop dhcp
 end script
-
diff --git a/os-dependent/chromeos/upstart-scripts/satlab-compose-up.conf b/os-dependent/chromeos/upstart-scripts/satlab-compose-up.conf
index 7929a08..4be18ad 100644
--- a/os-dependent/chromeos/upstart-scripts/satlab-compose-up.conf
+++ b/os-dependent/chromeos/upstart-scripts/satlab-compose-up.conf
@@ -62,6 +62,9 @@
     sleep 1
   done
 
+  docker stop compose || true
+  docker rm compose || true
+
   reps=0
   while [ ${reps} -lt 100 ] && \
         ! docker pull \
@@ -78,7 +81,7 @@
   DRONE_HOSTNAME="${DRONE_HOSTNAME}-${MACADDR}"
   echo "Drone Name: ${DRONE_HOSTNAME}"
 
-  docker run --rm --name compose \
+  docker run --restart unless-stopped --name compose \
     --label=com.centurylinklabs.watchtower.lifecycle.pre-update="docker-compose down" \
     --label=com.centurylinklabs.watchtower.stop-signal=KILL \
     -v /var/run/docker.sock:/var/run/docker.sock \
diff --git a/src/Makefile b/src/Makefile
index 8b39e8d..b52239c 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -21,6 +21,6 @@
 # pushed to prod and update this flag accordingly.
 # By default we use "stable" tag.
 export BUILD_VERSION := stable
-WATCHTOWER_CMD := --include-stopped --revive-stopped --interval 120 --monitor-only
+WATCHTOWER_CMD := --enable-lifecycle-hooks --include-stopped --revive-stopped --interval 120 --include-restarting --monitor-only -d
 SSH_PORT := 22
 include common.mk
\ No newline at end of file
diff --git a/src/cloudbuild_release.yaml b/src/cloudbuild_release.yaml
index 070c2b0..7935747 100644
--- a/src/cloudbuild_release.yaml
+++ b/src/cloudbuild_release.yaml
@@ -17,7 +17,7 @@
   _NGINX: "${__BUILD_VERSION}"
   _SATLAB_DRONE: "${__BUILD_VERSION}"
   _SATLAB_SECRETS: "${__BUILD_VERSION}"
-  _WATCHTOWER_CMD: --enable-lifecycle-hooks --interval 60 --include-restarting
+  _WATCHTOWER_CMD: --enable-lifecycle-hooks --include-stopped --revive-stopped --interval 3600 --include-restarting --monitor-only
 steps:
   - id: docker-compose
     name: "gcr.io/cloud-builders/docker"
@@ -157,6 +157,7 @@
         "--build-arg", "COMMON_CORE_URI=${_COMMON_CORE_URI}",
         "--build-arg", "BASE_REGISTRY_URI=${_BASE_REGISTRY_URI}",
         "--build-arg", "BUILD_VERSION=${__BUILD_VERSION}",
+        "--build-arg", "WATCHTOWER_CMD=${_WATCHTOWER_CMD}",
         "--label=version=${__BUILD_VERSION}",
         "-t", "${_REGISTRY_URI}/satlab-compose:${__LABEL}",
         "-f", "dockerfiles/compose/Dockerfile",