diff options
| -rw-r--r-- | Caddyfile | 1 | ||||
| -rw-r--r-- | Deploy.md | 6 |
2 files changed, 4 insertions, 3 deletions
@@ -1,3 +1,4 @@ golive.yyamashita.com { + header Referrer-Policy "no-referrer" reverse_proxy app:3000 } @@ -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)" ``` ## 初回サーバーセットアップ手順(再構築時) |
