AppServiceにコードをデプロイしたあと、5分以上経ってもhostingstart.htmlが表示。
hostingstart.html表示前に初回にドメインアクセス時にデプロイしたサービスが表示された。
その後、何度アクセスしても、hostingstart.html表示。
kudu toolsのログストリーム見てみた。
2025-03-30T09:51:12 Welcome, you are now connected to log-streaming service.
Starting Log Tail -n 10 of existing logs ----
/appsvctmp/volatile/logs/runtime/container.log
2025-03-30T09:34:13.0524536Z cd "/home/site/wwwroot"
2025-03-30T09:34:13.0524553Z
2025-03-30T09:34:13.0524632Z export NODE_PATH=/usr/local/lib/node_modules:$NODE_PATH
2025-03-30T09:34:13.0524652Z if [ -z "$PORT" ]; then
2025-03-30T09:34:13.0524670Z export PORT=8080
2025-03-30T09:34:13.0524688Z fi
2025-03-30T09:34:13.0524707Z
2025-03-30T09:34:13.0535645Z node /opt/startup/default-static-site.js
2025-03-30T09:34:42.5157080Z Terminated
2025-03-30T09:38:27.2954356Z 09.38.27.295272
Ending Log Tail of existing logs ---
Starting Live Log Stream ---
↑azコマンドでもみれる
az webapp log tail --name <appservicename> --resource-group <resource-group>
2025-03-30T10:04:57 Welcome, you are now connected to log-streaming service.
Starting Log Tail -n 10 of existing logs ----
/appsvctmp/volatile/logs/runtime/container.log
2025-03-30T09:34:13.0524536Z cd "/home/site/wwwroot"
2025-03-30T09:34:13.0524553Z
2025-03-30T09:34:13.0524632Z export NODE_PATH=/usr/local/lib/node_modules:$NODE_PATH
2025-03-30T09:34:13.0524652Z if [ -z "$PORT" ]; then
2025-03-30T09:34:13.0524670Z export PORT=8080
2025-03-30T09:34:13.0524688Z fi
2025-03-30T09:34:13.0524707Z
2025-03-30T09:34:13.0535645Z node /opt/startup/default-static-site.js
2025-03-30T09:34:42.5157080Z Terminated
2025-03-30T09:38:27.2954356Z 09.38.27.295272
Ending Log Tail of existing logs ---
Starting Live Log Stream ---
Azure Portal>対象リソースAppServiceのconfigurationのStartUp Commandに以下追加したらサービス表示されるようになった。
pm2 serve /home/site/wwwroot --no-daemon --spa