diff options
Diffstat (limited to 'Deploy.md')
| -rw-r--r-- | Deploy.md | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -41,8 +41,8 @@ ssh golive 'docker compose -f /app/docker-compose.yml ps' # 手動再起動 ssh golive 'cd /app && docker compose restart' -# スクレイピング手動実行 -ssh golive 'curl -s -X POST http://localhost:3000/api/scrape' +# スクレイピング手動実行(コンテナ内 Node で fetch) +ssh golive 'docker exec app-app-1 node -e "fetch(\"http://localhost:3000/api/scrape\").then(r=>r.text()).then(console.log)"' ``` ## スクレイピング定期実行(cron) @@ -50,7 +50,7 @@ ssh golive 'curl -s -X POST http://localhost:3000/api/scrape' ```bash ssh golive 'crontab -e' # 以下を追加(毎朝5時): -# 0 5 * * * curl -s -X POST http://localhost:3000/api/scrape +# 0 5 * * * docker exec app-app-1 node -e "fetch('http://localhost:3000/api/scrape').then(r=>r.text()).then(console.log)" ``` ## 初回サーバーセットアップ手順(再構築時) |
