# The Parich — deploy > Deploy UI + API: https://deploy.theparich.com > Login ด้วย API key ครั้งเดียว — ระบบจำให้ 7 วัน · **ไม่ต้องใช้ SSH** ## ใช้งาน (เว็บ) 1. เปิด https://deploy.theparich.com 2. ใส่ API key ของตัวเอง (ต้องมี role `owner` หรือ `admin`) 3. กด **Deploy** ที่ target ที่ต้องการ หน้าเดียวเห็นทุก target + สถานะ + log ล่าสุด ## ใช้งาน (API) ```bash # 1) แลก key เป็น session (อายุ 7 วัน) curl -s -X POST https://deploy.theparich.com/api/login \ -H "Authorization: Bearer tpk_xxx" # 2) ใช้ session (หรือ key ตรง ๆ) เรียก endpoint curl -s https://deploy.theparich.com/api/targets -H "Authorization: Bearer " curl -s -X POST https://deploy.theparich.com/api/deploy/erp-web -H "Authorization: Bearer " curl -s https://deploy.theparich.com/api/jobs/ -H "Authorization: Bearer " # รอจนเสร็จ (block สูงสุด 300 วิ) — เหมาะกับ AI/สคริปต์ curl -s "https://deploy.theparich.com/api/jobs/?wait=300" \ -H "Authorization: Bearer " ``` `status` ที่ได้: `running` · `success` · `failed` ### start / stop / restart ```bash curl -s -X POST https://deploy.theparich.com/api/action/mail/restart -H "Authorization: Bearer " curl -s -X POST https://deploy.theparich.com/api/action/mail/stop -H "Authorization: Bearer " curl -s -X POST https://deploy.theparich.com/api/action/mail/start -H "Authorization: Bearer " ``` ## กติกา - **`main` เท่านั้น** - **parallel ได้** คนละ target พร้อมกัน · target เดียวกันซ้อนไม่ได้ (`429`) - build ล้ม = ของเดิมไม่ถูกแตะ - container ไม่ขึ้น = rollback อัตโนมัติ ## Targets ดูรายการสดที่หน้าเว็บ หรือ `GET /api/targets` | type | ทำอะไร | |---|---| | `web-static` | build แล้วสลับ `dist` | | `container` | build image + force-recreate + health check | | `unconfigured` | ยังไม่พร้อม deploy — แจ้ง owner ตั้งค่า | ## หมายเหตุ SSH ปิดสำหรับผู้ใช้ทั่วไปแล้ว — เป็นทางถอยของ owner เท่านั้น