From e207f7116d433d1903a0aa90e2bacd96069fc7ff Mon Sep 17 00:00:00 2001 From: canerg Date: Fri, 21 Jun 2024 11:06:22 +0300 Subject: [PATCH] add docker restart on failure --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3b0414f..2c7349a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -34,4 +34,4 @@ jobs: docker pull ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_APP_NAME }}:latest docker stop ${{ secrets.DOCKER_APP_NAME }} || true docker rm ${{ secrets.DOCKER_APP_NAME }} || true - docker run -d -p 8080:8080 --name ${{ secrets.DOCKER_APP_NAME }} ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_APP_NAME }}:latest + docker run --restart=on-failure -d -p 8080:8080 --name ${{ secrets.DOCKER_APP_NAME }} ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_APP_NAME }}:latest