2828 uses : docker/setup-buildx-action@v2
2929 with :
3030 platforms : linux/arm64
31+ # Build cache'i devre dışı bırak
32+ buildkitd-flags : --debug
3133
3234 # Docker Hub'a giriş yap
3335 - name : Login to DockerHub
@@ -46,54 +48,18 @@ jobs:
4648 tags : |
4749 ${{ secrets.DOCKERHUB_USERNAME }}/eureka-server:latest-arm64
4850 ${{ secrets.DOCKERHUB_USERNAME }}/eureka-server:${{ github.sha }}-arm64
49- cache-from : type=registry,ref=${{ secrets.DOCKERHUB_USERNAME }}/eureka-server:buildcache-arm64
50- cache-to : type=registry,ref=${{ secrets.DOCKERHUB_USERNAME }}/eureka-server:buildcache-arm64,mode=max
51- build-args : |
52- BUILDPLATFORM=linux/arm64
53- TARGETPLATFORM=linux/arm64
54-
55- # Google Cloud kimlik doğrulaması
56- - id : " auth"
57- name : " Authenticate to Google Cloud"
58- uses : " google-github-actions/auth@v1"
59- with :
60- credentials_json : " ${{ secrets.GCP_SA_KEY }}"
61-
62- # Google Cloud CLI kurulumu
63- - name : " Set up Cloud SDK"
64- uses : " google-github-actions/setup-gcloud@v1"
51+ # Cache'i devre dışı bırak
52+ no-cache : true
53+ pull : true
6554
55+ # VPS'e deploy
6656 - name : Deploy to VPS
6757 uses : appleboy/ssh-action@master
6858 with :
6959 host : ${{ secrets.VPS_HOST }}
7060 username : ${{ secrets.SSH_USERNAME }}
7161 key : ${{ secrets.SSH_PRIVATE_KEY }}
72- script_stop : true
73- debug : true
74- command_timeout : " 20m"
7562 script : |
76- echo "=== Testing SSH Connection ==="
77- whoami
78- pwd
79-
80- echo "=== System Architecture ==="
81- uname -m
82-
83- echo "=== Testing Directory Access ==="
84- ls -la /opt/craftpilot || mkdir -p /opt/craftpilot
85-
86- echo "=== Testing Docker ==="
87- docker version
88- docker info
89- docker ps
90-
91- # Docker ağını oluştur (eğer yoksa)
92- docker network create craftpilot-network || true
93-
94- echo "=== Pulling ARM64 Image ==="
95- docker pull ${{ secrets.DOCKERHUB_USERNAME }}/eureka-server:latest-arm64
96-
9763 echo "=== Stopping Old Container ==="
9864 docker stop eureka-server || true
9965 docker rm eureka-server || true
@@ -102,21 +68,21 @@ jobs:
10268 docker run -d \
10369 --name eureka-server \
10470 --network craftpilot-network \
105- -p 8761:8761 \
71+ -p 8057:8057 \
10672 -e SPRING_PROFILES_ACTIVE=prod \
10773 -e EUREKA_USERNAME=craftpilot \
10874 -e EUREKA_PASSWORD=13579ada \
10975 ${{ secrets.DOCKERHUB_USERNAME }}/eureka-server:latest-arm64
11076
11177 echo "=== Waiting for Container to Start ==="
112- sleep 60 # Biraz daha uzun bekleyelim
78+ sleep 30
11379
11480 echo "=== Container Logs ==="
11581 docker logs eureka-server
11682
11783 echo "=== Health Check ==="
11884 for i in {1..5}; do
119- if curl -f http://localhost:8761 /actuator/health; then
85+ if curl -f -u craftpilot:13579ada http://localhost:8057 /actuator/health; then
12086 echo "Service is healthy"
12187 exit 0
12288 fi
0 commit comments