a620906209
|
6a7d98b0fe
|
feat(docker): 移除 bind mount,程式碼與 vendor 烘進 image
Run Tests / test (pull_request) Successful in 32s
Dockerfile 改 multi-stage(app + web),app/scheduler/queue-worker/
reverb/nginx 五個服務都不再依賴 ./:/var/www bind mount 取得程式碼;
nginx 改本地 build 從 app 階段 COPY --from 取得 public/,public/storage
symlink 在兩階段各自於 build 時建立。docker-compose.yml 新增具名 volume
storage-app-public 讓上傳檔案跨 image 重建保留;env_file: 取代原本
bind mount 帶入 .env 的方式,只給四個 Laravel runtime 服務。
compose.override.yml 補上開發用 bind mount 維持改 code 立即生效;
docker-entrypoint.sh 收斂到只剩目錄權限設定,migration/cache/swagger
移到 deploy.yml 統一負責,避免職責重疊。
實作驗證時發現並修復三個規劃階段沒預見的問題:app 服務的 build: 缺
target: app 導致預設建到最後一個 stage(image 實際變成 nginx);
.dockerignore 需排除本機既有的 public/storage 符號連結(Windows 上
會讓 build context 打包失敗);env_file: 讓 .env 全部變數變成真實
環境變數、蓋掉 phpunit.xml 的測試隔離設定,已擴大 tests/bootstrap.php
的強制覆蓋清單修復(239 tests 全綠)。
本機 dev 模式與 production 模式(無 override)皆完整驗證:healthcheck、
migration/cache/swagger、上傳檔案持久性、nginx 獨立於 app 服務靜態檔
與 storage 檔案、.env 熱更新、nginx 無 .env 存取權。
openspec change: bake-image-remove-bind-mount
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0142LC1kQb8EyV59TjHDkhWS
|
2026-08-04 16:59:18 +08:00 |
|
a620906209
|
3b73be4051
|
fix(ci): 補上 php84-simplexml,修正 aws-sdk-php composer install 失敗
Run Tests / test (pull_request) Successful in 39s
aws/aws-sdk-php(因 league/flysystem-aws-s3-v3 新增)要求 ext-simplexml,
CI 的 Alpine runner 用 apk 逐一裝擴充套件,之前沒裝這個 package 導致
composer install 失敗。正式環境的 Dockerfile 是 Debian 版 php:8.2-fpm,
simplexml 內建就有,不受影響,只有 CI 這邊要補。
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011LpcY9b7y9x4fusHBTXciQ
|
2026-08-03 03:46:10 +08:00 |
|
a620906209
|
b218fa0964
|
fix(swagger): 修正 VPS 無法顯示 Swagger UI 的問題
Run Tests / test (pull_request) Successful in 33s
問題根因:
1. deploy.yml 未執行 l5-swagger:generate,VPS 上不存在 api-docs.json
2. @OA\Server 使用相對路徑 "/api",Swagger UI Try it out 無法正確打到 VPS API
修正:
- @OA\Server 改用 L5_SWAGGER_CONST_HOST 常數,透過 .env 各環境設定
- deploy.yml 在 config:cache 後補上 l5-swagger:generate 步驟
- .env.example 補上 L5_SWAGGER_CONST_HOST 與 L5_SWAGGER_GENERATE_ALWAYS 說明
VPS .env 需手動加入:
L5_SWAGGER_CONST_HOST=https://api.hank-space.com/api
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-06-23 15:23:18 +08:00 |
|
a620906209
|
0080e2da84
|
fix(ci): 修正 Alpine 3.23 PHP 套件名稱為 php84
Run Tests / test (pull_request) Successful in 37s
Alpine 3.23 已無 php82 套件,改用 php84。
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-06-18 00:37:46 +08:00 |
|
a620906209
|
95a93b2d72
|
fix(ci): 替換 setup-php 為 Alpine apk 直接安裝 PHP 8.2
Run Tests / test (pull_request) Failing after 7s
shivammathur/setup-php 在 Alpine runner 上需要 sudo 且編譯耗時。
改用 apk add php82 系列套件,速度更快且相容 Alpine 環境。
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-06-18 00:32:44 +08:00 |
|
a620906209
|
aebce80152
|
fix(ci): test.yml 改用 self-hosted runner 避免 Docker-in-Docker 衝突
Run Tests / test (pull_request) Failing after 42s
ubuntu-latest 觸發 container 模式,導致 mkdirat var/run: file exists 錯誤。
改成 self-hosted 與 deploy.yml 一致,直接跑在 host 模式。
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-06-17 23:48:27 +08:00 |
|
a620906209
|
6f446f601f
|
test(auth): 新增三角色登入/註冊/登出、P2 帳號鎖定、OAuth state 驗證測試
新增 34 個 Feature 測試(AuthLoginTest 19、AuthLockoutTest 11、
AuthOAuthTest 4)涵蓋 member/provider/admin 的註冊、登入、登出與跨角色
隔離;P2 帳號鎖定的 Fixed Window 計數、companion cache key 與 email
正規化;以及 P2 OAuth state 的 CSRF 驗證與一次性消耗。
同時新增 .gitea/workflows/test.yml 在 push/PR 時於 CI 自動執行測試
(含 GD 等擴充套件安裝),並補上對應的 OpenSpec 變更文件
(proposal/design/spec/tasks,34 項驗收情境與測試 1:1 對應)。
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-06-08 04:01:33 +08:00 |
|
a620906209
|
0a6bfd9df8
|
fix: 改用 BusyBox 相容的 flock 語法
BusyBox flock 不支援 -w,移除 timeout 參數。
等待行為不變,預設會阻塞直到取得鎖。
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-05-29 03:04:12 +08:00 |
|
a620906209
|
0160d72467
|
fix: 修正 CI 並發 fetch 導致 git ref 衝突
git pull 改為 flock + fetch + reset --hard:
- flock 防止兩次 CI 同時更新 ref 產生 race condition
- reset --hard 比 pull 更適合 CI 環境,不做 merge
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-05-29 03:00:57 +08:00 |
|
a620906209
|
cc010b5c83
|
fix: use self-hosted runner for deploy workflow
Deploy Production / deploy (push) Successful in 19s
|
2026-05-25 16:31:20 +00:00 |
|
a620906209
|
f996a0053b
|
fix: 修正 Gitea Actions runner 標籤不符問題
將 runs-on 從 self-hosted 改為 ubuntu-latest,
與 act_runner 實際註冊的標籤一致。
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-05-25 23:34:51 +08:00 |
|
a620906209
|
75462c2619
|
ci: 新增 Gitea Actions 自動部署 workflow
push master 時自動執行:git pull、composer install、migrate、
config cache、重啟 queue worker;前端有變動才重建 image
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-05-25 17:03:01 +08:00 |
|