diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a9c0cc3..75b7464 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,7 +17,7 @@ deploy: needs: ["build"] script: - echo "Restarting container..." - - docker rm -f travelmarine-frontend || true + - docker ps -a --filter 'name=^/travelmarine-frontend$' --format '{{.Names}}' | grep -q '^travelmarine-frontend$' && docker rm -f travelmarine-frontend || true - docker run -d --name travelmarine-frontend --restart unless-stopped \ -p 127.0.0.1:3000:3000 \ travelmarine-frontend:latest