From 7c19cd089c6104b8551a1cca57a6dd473a1bd616 Mon Sep 17 00:00:00 2001
From: Hugo SUBTIL <ext.sopra.husubtil@grandlyon.com>
Date: Wed, 5 Jan 2022 14:03:23 +0100
Subject: [PATCH] fix(cicd): add stop cmd for deploy job

---
 .gitlab-ci.yml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3564df811..0fb104a4e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -63,6 +63,7 @@ deploy_dev:
     - cd /home/mps/ram
     - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
     - docker-compose pull web-app
+    - docker-compose stop web-app
     - docker-compose up -d web-app
     - docker system prune -a -f
 
@@ -76,6 +77,7 @@ deploy_mobile:
     - cd /home/mps/ram
     - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
     - docker-compose pull web-app
+    - docker-compose stop web-app
     - docker-compose up -d web-app
     - docker system prune -a -f
 
@@ -89,6 +91,7 @@ deploy_rec:
     - cd /home/mps/ram
     - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
     - docker-compose pull web-app-rec
+    - docker-compose stop web-app
     - docker-compose up -d web-app-rec
     - docker system prune -a -f
 
-- 
GitLab