refactor: simplify docker deployment without ssh acting as native socket executor

This commit is contained in:
2026-04-15 17:02:30 +03:00
parent 476874da2b
commit de5e145c4e
+24 -27
View File
@@ -2,38 +2,35 @@ name: Deploy Iddaai Frontend
on: on:
push: push:
branches: branches: [main]
- main
jobs: jobs:
deploy: build-and-deploy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout Code - name: Kodu Cek
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Install sshpass - name: Docker Build
run: sudo apt-get update && sudo apt-get install -y sshpass
- name: Deploy to Raspberry Pi via rsync
env:
SERVER_PASSWORD: ${{ secrets.SERVER_PASSWORD }}
SERVER_IP: "95.70.252.214"
SERVER_PORT: "2222"
SERVER_USER: "haruncan"
run: | run: |
export SSHPASS=$SERVER_PASSWORD docker build \
sshpass -e rsync -avz --exclude node_modules --exclude .git --exclude dist --exclude .next --exclude .DS_Store -e "ssh -o StrictHostKeyChecking=no -p $SERVER_PORT" ./ $SERVER_USER@$SERVER_IP:~/apps/iddaai/fe/ --build-arg NEXT_PUBLIC_API_URL='https://api.iddaai.com/api' \
--build-arg NEXT_PUBLIC_AUTH_REQUIRED='false' \
-t iddaai-fe:latest .
- name: Restart Frontend Docker Service - name: Eski Konteyneri Sil
uses: appleboy/ssh-action@v1.0.3 run: docker rm -f iddaai-fe || true
with:
host: "95.70.252.214" - name: Yeni Versiyonu Baslat
port: "2222" run: |
username: "haruncan" docker run -d \
password: ${{ secrets.SERVER_PASSWORD }} --name iddaai-fe \
script: | --restart unless-stopped \
cd ~/apps/iddaai --network iddaai_iddaai-network \
docker compose build frontend -p 127.0.0.1:1510:3000 \
docker compose up -d frontend -e NODE_ENV=production \
-e NEXT_PUBLIC_API_URL='https://api.iddaai.com/api' \
-e NEXTAUTH_URL='https://iddaai.com' \
-e NEXTAUTH_SECRET='fFw34R134jRof1H2jofh2!32hU3gfjA1' \
-e NEXT_PUBLIC_AUTH_REQUIRED='false' \
iddaai-fe:latest