Skip to content

Commit

Permalink
Update autoredeploy.yml, use docker compose down
Browse files Browse the repository at this point in the history
change to using docker compose down instead of complicated logic for figuring out old images and containers
  • Loading branch information
Magnus Alexander Strømseng authored and GitHub committed Apr 18, 2024
1 parent d77bd73 commit 3254e63
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions .github/workflows/autoredeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3254e63

Please sign in to comment.