iT邦幫忙

2025 iThome 鐵人賽

DAY 10
0

機器建好了;也在上面安裝好了AWS ECS, Docker等工具,並將這些工具正常運行後,只需要再創建一個ECS Service來產生一個Docker Container並透過ECS掛在我們的這台Service上執行:

  1. ECS → Clusters → trade-cluster → Services → Create
    https://ithelp.ithome.com.tw/upload/images/20250920/20161802yebTFJ1eMx.jpg

  2. Compute options / Launch type:選 EC2

    https://ithelp.ithome.com.tw/upload/images/20250920/20161802bPMbvOSNqJ.jpg

  3. Application type:Service

  4. Task definition:選剛建的 hello-web:1(或最新版)

  5. Desired tasks1
    https://ithelp.ithome.com.tw/upload/images/20250920/20161802hhKSMuZUm9.jpg
    設定同一個時間最多跑一個service (100%)
    https://ithelp.ithome.com.tw/upload/images/20250920/20161802gfHmz4YVQ1.jpg

  6. 其他選項維持預設(EC2 模式下網路由主機承擔,這裡不選 SG)→ Create Service

  7. 回到 Service 頁面,等到 Running instances = 1
    https://ithelp.ithome.com.tw/upload/images/20250920/20161802Sq92Uktm0E.jpg

  8. 輸入http://PUBLICIP:8080 就可以看到Hello Web可以被看到了。
    https://ithelp.ithome.com.tw/upload/images/20250920/20161802AV1cbFLNmN.jpg


上一篇
Day9 - 建立ECS Task Definition
下一篇
Day11 - 本地開發價格繪製網頁,仍在Debug中
系列文
從零開始:AWS 部署 Python 自動交易程式與交易監測 Dashboard 實戰筆記12
圖片
  熱門推薦
圖片
{{ item.channelVendor }} | {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言