Skip to content

Commit 60a42e6

Browse files
committed
feat: update deployment steps in Docker workflow to use docker-compose
1 parent e57b77a commit 60a42e6

1 file changed

Lines changed: 8 additions & 12 deletions

File tree

.github/workflows/docker.yml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
runs-on: ubuntu-latest
6161

6262
steps:
63-
- name: SSH and redeploy
63+
- name: SSH and
6464
uses: appleboy/ssh-action@v1
6565
with:
6666
host: ${{ secrets.DEPLOY_HOST }}
@@ -74,17 +74,13 @@ jobs:
7474
7575
echo "${{ secrets.GHCR_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin
7676
77-
docker pull "${IMAGE}"
77+
cd ${{ secrets.INFRA_DIR }}
7878
79-
docker stop "${CONTAINER}" 2>/dev/null
80-
docker rm "${CONTAINER}" 2>/dev/null
79+
# Pull the latest image
80+
docker compose pull libdse-api
8181
82-
docker run -d \
83-
--name "${CONTAINER}" \
84-
--restart unless-stopped \
85-
-p 127.0.0.1:7860:7860 \
86-
-v /opt/speech-enhancement/data:/app/data:ro \
87-
"${IMAGE}"
82+
# Restart the container with the new image
83+
docker compose up -d libdse-api
8884
89-
docker image prune -f
90-
echo "Deployed ${IMAGE} successfully."
85+
# Clean up dangling images
86+
docker system prune -f

0 commit comments

Comments
 (0)