05a116beee
Run Tests / test (pull_request) Successful in 32s
VPS 部署與功能驗證皆已完成(tasks.md 7.7/7.8),change 移入 archive/2026-08-04-bake-image-remove-bind-mount。同步兩份 delta spec: 新建 image-baked-deployment 主規格(multi-stage build、symlink 建立、 nginx 獨立 build target、env_file 注入等 11 條 requirement);更新 scheduler-container 補上「不依賴 bind mount」的敘述與 scenario。 openspec validate --strict --specs 39/39 全過。 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0142LC1kQb8EyV59TjHDkhWS
1.2 KiB
1.2 KiB
MODIFIED Requirements
Requirement: Scheduler 以獨立 container 執行
docker-compose.yml SHALL 定義 scheduler service,使用 cfdive-platform image(其中已於 build 階段內嵌完整程式碼,不依賴 ./:/var/www bind mount),以 php artisan schedule:work 前台輪詢方式執行 Laravel Scheduler,取代原本在 app container 內的 cron daemon。
Scenario: Scheduler container 隨 app 啟動
- WHEN 執行
docker compose up -d且appcontainer 已 healthy - THEN
schedulercontainer 啟動並持續執行php artisan schedule:work
Scenario: App container 重啟時 scheduler 等待就緒
- WHEN
appcontainer 重啟中(unhealthy) - THEN
schedulercontainer 依depends_on等待apphealthy 後才啟動,避免 scheduler 在 PHP-FPM 未就緒時執行任務
Scenario: Scheduler 不依賴主機 bind mount 取得程式碼
- WHEN 執行
docker compose -f docker-compose.yml up -d(production,不含 override) - THEN
schedulercontainer 執行的排程任務程式碼完全來自cfdive-platformimage build 時內嵌的內容,與主機端程式碼目錄是否存在無關