Skip to content

Commit db094e9

Browse files
author
Martino Visintin
committed
reduce downtime on deployment
- tear down the running cloujera container after the new one is ready
1 parent ed72a6b commit db094e9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts/deploy.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ sudo -v
77
cloujera_container_name="cloujera"
88
cloujera_image_tag=$cloujera_container_name
99

10-
echo "==> Removing existing cloujera container"
11-
sudo docker rm -f $cloujera_container_name || true
12-
1310
echo "==> pulling most recent version (git)"
1411
# FIXME: it would be nice to checkout to avoid weird
1512
# stuff happening, but it's really easy to run this
@@ -24,9 +21,12 @@ lein cljsbuild once
2421
echo "==> Uberjarring"
2522
lein uberjar
2623

27-
echo "==> Building container"
24+
echo "==> Building new cloujera container"
2825
sudo docker build --tag $cloujera_image_tag ./
2926

27+
echo "==> Removing existing cloujera container"
28+
sudo docker rm -f $cloujera_container_name || true
29+
3030
echo "==> Running container"
3131
sudo docker run \
3232
--detach \

0 commit comments

Comments
 (0)