chore(openspec): 歸檔 bake-image-remove-bind-mount + 同步主規格
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
This commit is contained in:
2026-08-04 17:40:00 +08:00
parent 286db8ffe2
commit 05a116beee
8 changed files with 177 additions and 3 deletions
+5 -1
View File
@@ -7,7 +7,7 @@ Laravel Scheduler 以獨立 container 執行,取代 app container 內的 cron
## Requirements
### Requirement: Scheduler 以獨立 container 執行
`docker-compose.yml` SHALL 定義 `scheduler` service,使用 `cfdive-platform` image,以 `php artisan schedule:work` 前台輪詢方式執行 Laravel Scheduler,取代原本在 app container 內的 cron daemon。
`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``app` container 已 healthy
@@ -17,6 +17,10 @@ Laravel Scheduler 以獨立 container 執行,取代 app container 內的 cron
- **WHEN** `app` container 重啟中(unhealthy
- **THEN** `scheduler` container 依 `depends_on` 等待 `app` healthy 後才啟動,避免 scheduler 在 PHP-FPM 未就緒時執行任務
#### Scenario: Scheduler 不依賴主機 bind mount 取得程式碼
- **WHEN** 執行 `docker compose -f docker-compose.yml up -d`production,不含 override
- **THEN** `scheduler` container 執行的排程任務程式碼完全來自 `cfdive-platform` image build 時內嵌的內容,與主機端程式碼目錄是否存在無關
### Requirement: App container 不再包含 cron daemon
`Dockerfile` SHALL 不安裝 `cron` 套件,`docker-entrypoint.sh` SHALL 不執行 `service cron start`,確保 app container 職責單一(只跑 PHP-FPM)。