กลับไปยังเอกสาร
CI/CD และการปรับใช้อัตโนมัติ

ตั้งค่า Auto-Deploy

Deploy แอปพลิเคชันของคุณโดยอัตโนมัติเมื่อคุณ push code ไปยัง GitHub

Intermediate5 min readUpdated 2024-02-01

Auto-deploy คืออะไร?

Auto-deploy จะ redeploy แอปของคุณโดยอัตโนมัติเมื่อ:

  • คุณ push code ไปยัง branch ที่กำหนดค่า
  • Workflow เสร็จสมบูรณ์สำเร็จ
  • คุณทริกเกอร์ deployment ด้วยตนเอง

ไม่จำเป็นต้องคลิก "Deploy" ทุกครั้งที่คุณทำการเปลี่ยนแปลง

เปิดใช้งาน auto-deploy

  1. เปิดการตั้งค่าแอปของคุณ
  2. ไปที่แท็บ CI/CD
  3. สลับ "Auto-Deploy" เป็นเปิด
  4. เลือก branch ที่จะติดตาม
  5. กำหนดค่า polling interval (หรือใช้ webhooks)

การทำงาน

Server Compass ตรวจสอบการเปลี่ยนแปลง:

  1. Polls repository ของคุณในช่วงเวลาที่กำหนดค่า
  2. ตรวจจับ commits ใหม่บน branch ของคุณ
  3. ทริกเกอร์ build และ deployment ใหม่
  4. แจ้งเตือนคุณเมื่อสำเร็จหรือล้มเหลว

Zero-downtime deployment

Auto-deploy ใช้กลยุทธ์ zero-downtime:

  1. Container ใหม่เริ่มต้น alongside ที่มีอยู่
  2. Health checks ตรวจสอบ container ใหม่
  3. Traffic สลับไปยัง container ใหม่
  4. Container เก่าหยุดอย่างสง่างาม

Screenshots

ตั้งค่า Auto-Deploy - Screenshot 1

Video Tutorials

Related Features

Ready to try Server Compass?

Download the app and deploy your first application in under 5 minutes.

Download Server Compass