Skip to content

Commit

Permalink
fix: Start Docker service before loading image add interactive load t…
Browse files Browse the repository at this point in the history
…o read .tar files

To ensure that the Docker service is running before attempting to load the image, this commit modifies the deployment workflow to start the Docker service using `systemctl` before executing the `docker load` command. This prevents any potential issues with loading the image due to the Docker service not being active.
  • Loading branch information
aridanemartin committed Jun 29, 2024
1 parent 3b13487 commit 68b6133
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ jobs:
username: ${{ secrets.EC2_USER }}
key: ${{ secrets.EC2_KEY }}
script: |
docker import < ~/gatos-sin-hogar-backend.tar
sudo systemctl status docker || sudo systemctl start docker
docker load -i < ~/gatos-sin-hogar-backend.tar
docker stop gatos-sin-hogar-backend || true
docker rm gatos-sin-hogar-backend || true
docker run -d --name gatos-sin-hogar-backend -p 80:7000 gatos-sin-hogar-backend

0 comments on commit 68b6133

Please sign in to comment.