diff --git a/.github/workflows/autoredeploy.yml b/.github/workflows/autoredeploy.yml index 6a3466a..c40da8e 100644 --- a/.github/workflows/autoredeploy.yml +++ b/.github/workflows/autoredeploy.yml @@ -11,17 +11,8 @@ jobs: runs-on: self-hosted steps: - uses: actions/checkout@v3 - - name: Stop and remove containers, then remove images - run: | - # Find and stop containers running from 'backend:outreach' image, then remove them - docker ps -aq --filter ancestor=backend:outreach | xargs -r docker stop | xargs -r docker rm - - # Find and stop containers running from 'frontend:outreach' image, then remove them - docker ps -aq --filter ancestor=frontend:outreach | xargs -r docker stop | xargs -r docker rm - - # Now, remove the images - docker rmi backend:outreach frontend:outreach || true - + - name: Stop and remove containers and images, using docker compose down + run: docker-compose down - name: Create .env files run: | # Create .env with all variables except HOST_URL Backend