feat: use docker compose
CI / Rust CI (push) Successful in 1m11s
Publish & Deploy / Build and Push to Registry (push) Successful in 1m27s
Publish & Deploy / Deploy via SSH (push) Failing after 3s

This commit is contained in:
2026-04-09 17:09:27 +02:00
parent 40364b5638
commit 654b8e2987
2 changed files with 26 additions and 4 deletions
+4 -4
View File
@@ -57,7 +57,7 @@ jobs:
steps:
- name: Copy docker-compose to server
run: |
scp docker-compose.yml bot@${{ secrets.SSH_HOST }}:/opt/iceberg/docker-compose.yml
scp docker-compose.yml bot@${{ secrets.SSH_HOST }}:/home/shared/iceberg/chat/chat-api/docker-compose.yml
- name: Execute remote deployment
uses: appleboy/ssh-action@v1.0.3
with:
@@ -65,17 +65,17 @@ jobs:
username: bot
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
scp docker-compose.yml bot@your-server:/opt/iceberg/docker-compose.yml
REPO_LOWER=$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')
TAG=${{ github.ref_name }}
echo "${{ secrets.CONTAINER_REGISTRY_TOKEN }}" | docker login gitea.iceberg.black -u "docker-bot" --password-stdin
docker pull gitea.iceberg.black/${{ env.REPO_LOWER }}:${{ github.ref_name }}
docker pull gitea.iceberg.black/$REPO_LOWER:$TAG
docker logout gitea.iceberg.black
docker stop chat || true
docker rm chat || true
cd /home/shared/iceberg/chat/chat-api
docker compose up -d
docker image prune -af
+22
View File
@@ -0,0 +1,22 @@
services:
chat:
image: gitea.iceberg.black/${REPO_LOWER}:${TAG}
container_name: chat
ports:
- "6066:3000"
restart: always
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
NVIDIA_DRIVER_CAPABILITIES: compute,utility,management
NVIDIA_VISIBLE_DEVICES: all
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]