# 3-วิธีการ Deploy web app ไปยัง App Service

มาครับในบทความนี้ เราจะพามาดูวิธีการที่เราจะนำเจ้าตัวเว็บแอปพลิเคชันของเราขึ้นไปรันบน Azure App Service กันครับ แต่ก่อนอื่นขอบอกก่อนว่า App Service ตัวนี้สามารถ Deploy ได้ทั้ง 2 แบบ&#x20;

* Automated deployment
* Manual deployment<br>

### <mark style="color:yellow;">Automated deployment</mark> คืออะไร&#x20;

Automated deployment หรือ continuous integration (CI) ส่วนนี้จะเป็นการ build และ test โดยอัตโนมัติ ซึ่งเป็นกระบวนการในการเผยแพร่ซอฟต์แวร์หรือเว็บแอปพลิเคชันของเรานั้นเองบน Azure มีการรองรับการการทำ CI จากหลายแหล่ง ไม่ว่าจะเป็น

* **Azure DevOps** เราสามารถ push โค้ดไปยัง Azure DevOps ได้ ซึ่งเจ้า Auzre DevOps ก็คือบริการหนึ่งบน Azure สำหรับการทำงานร่วมกันของท้ังทีม DevOps บน Azure และใน App Service ยังสามารถดึงโค้ดที่อยู่บน Azure DevOps มาใช้ได้อย่างง่ายดาย
* **GitHub** แพลตฟอร์มการโฮสต์โค้ดไปเก็บไว้สำหรับการทำ version control และใช้งานร่วมกันในการพัฒนาโปรเจกต์ต่างๆ ซึ่ง App Service ก็รองรับการทำ CI/CD โดยการเชื่อมต่อจาก GitHub repository ของเราอีกด้วย
* **Bitbucket** แพลตฟอร์มที่มีความคล้ายกับ GitHub ซึ่ง Azure ก็รองรับการทำ CI/CD กับเช่นกัน

### <mark style="color:yellow;">**Manual deployment**</mark> มีตัวเลือกในการ push โค้ดขึ้นมายัง App service ดังนี้

* **Git**: App Service มีฟีเจอร์ Git URL ที่สามารถเพิ่ม repository ใน git บนเครื่องของเราไปยัง App service ได้
* CLI: `webapp up` เป็นคำสั่งสำหรับการ deploy เว็บแอปพลิเคชันไป App service โดยจะสามารถสร้าง คุณลักษณะของอินเทอร์เฟซบรรทัดคำสั่ง az ที่รวมแอปของคุณและปรับใช้ ไม่เหมือนกับวิธีการปรับใช้อื่นๆ `az webapp up` สามารถสร้างเว็บแอป App Service ใหม่ให้คุณได้ หากคุณยังไม่ได้สร้าง การปรับใช้ Zip: ใช้ curl หรือยูทิลิตี้ HTTP ที่คล้ายกันเพื่อส่ง ZIP ของไฟล์แอปพลิเคชันของคุณไปยัง App Service
* FTP/S โดย FTP หรือ FTPS เป็นวิธีการดั้งเดิมในการพุชรหัสของคุณไปยังสภาพแวดล้อมการโฮสต์จำนวนมาก รวมถึงบริการแอพ

###

### สร้างสรรค์เนื้อหาที่แสนจะเข้าใจง่ายโดย

🐲 Sirasit Boonklang (แอดเอฟ) - Tech & Coding Consultant @ borntoDev Co., Ltd.

[Facebook](https://www.facebook.com/borntodev) | [YouTube](https://www.youtube.com/c/borntodevTH) | [Instagram](https://www.instagram.com/borntodev/) | [TikTok](https://www.tiktok.com/@borntodev)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://open.borntodev.com/open-access-tutorial/system-and-cloud/microsoft-azure/get-started-with-azure-app-service/3-deploy-web-app-app-service.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
