Skip to content

Commit

Permalink
take two
Browse files Browse the repository at this point in the history
  • Loading branch information
loftwah committed Aug 2, 2024
1 parent ccc23cd commit 5fe054b
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ jobs:
key: ${{ secrets.DROPLET_SSH_PRIVATE_KEY }}
script: |
echo "${{ secrets.GH_PAT }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
docker compose -f /root/docker-compose.prod.yml --env-file /root/.env down
docker compose -f /root/docker-compose.prod.yml --env-file /root/.env pull
docker compose -f /root/docker-compose.prod.yml --env-file /root/.env up -d
# Stop and remove all running containers
docker stop $(docker ps -aq) || true
docker rm $(docker ps -aq) || true
# Pull the latest image
docker pull ghcr.io/loftwah/linkarooie:latest
# Run the new container
docker run -d --name linkarooie-app -p 80:3000 -e RAILS_ENV=production -e SECRET_KEY_BASE=${{ secrets.SECRET_KEY_BASE }} ghcr.io/loftwah/linkarooie:latest

0 comments on commit 5fe054b

Please sign in to comment.