From 2e9ef20e24150a0d6a23db137529b3940ebbdeff Mon Sep 17 00:00:00 2001 From: jlightner Date: Mon, 30 Mar 2026 12:05:28 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20Updated=20Dockerfile.web=20and=20docker?= =?UTF-8?q?-compose.yml=20on=20ub01=20to=20pass=20VIT=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - "docker/Dockerfile.web" - "docker-compose.yml" GSD-Task: S06/T02 --- .gsd/milestones/M006/slices/S06/S06-PLAN.md | 2 +- .../M006/slices/S06/tasks/T01-VERIFY.json | 48 +++++++++++ .../M006/slices/S06/tasks/T02-SUMMARY.md | 84 +++++++++++++++++++ 3 files changed, 133 insertions(+), 1 deletion(-) create mode 100644 .gsd/milestones/M006/slices/S06/tasks/T01-VERIFY.json create mode 100644 .gsd/milestones/M006/slices/S06/tasks/T02-SUMMARY.md diff --git a/.gsd/milestones/M006/slices/S06/S06-PLAN.md b/.gsd/milestones/M006/slices/S06/S06-PLAN.md index 0cf54fa..ee726ea 100644 --- a/.gsd/milestones/M006/slices/S06/S06-PLAN.md +++ b/.gsd/milestones/M006/slices/S06/S06-PLAN.md @@ -20,7 +20,7 @@ - Estimate: 45m - Files: frontend/vite.config.ts, frontend/src/vite-env.d.ts, frontend/src/components/AppFooter.tsx, frontend/src/App.tsx, frontend/src/App.css - Verify: cd frontend && npm run build 2>&1 | tail -5 && echo 'Build OK' && grep -q '__APP_VERSION__' vite.config.ts && grep -q 'AppFooter' src/App.tsx && test -f src/components/AppFooter.tsx && echo 'All checks pass' -- [ ] **T02: Update Docker build to pass git commit SHA to web image and deploy** — Update Dockerfile.web and docker-compose.yml on ub01 to pass GIT_COMMIT_SHA as a build arg to the web service. Rebuild and deploy to verify the footer renders with real version info. +- [x] **T02: Updated Dockerfile.web and docker-compose.yml on ub01 to pass VITE_GIT_COMMIT build arg, rebuilt and deployed — footer shows v0.1.0, build date, commit 08d7d19, and GitHub link** — Update Dockerfile.web and docker-compose.yml on ub01 to pass GIT_COMMIT_SHA as a build arg to the web service. Rebuild and deploy to verify the footer renders with real version info. **Important context:** - All Docker files are on ub01 at `/vmPool/r/repos/xpltdco/chrysopedia/`. diff --git a/.gsd/milestones/M006/slices/S06/tasks/T01-VERIFY.json b/.gsd/milestones/M006/slices/S06/tasks/T01-VERIFY.json new file mode 100644 index 0000000..c79a865 --- /dev/null +++ b/.gsd/milestones/M006/slices/S06/tasks/T01-VERIFY.json @@ -0,0 +1,48 @@ +{ + "schemaVersion": 1, + "taskId": "T01", + "unitId": "M006/S06/T01", + "timestamp": 1774872058473, + "passed": false, + "discoverySource": "task-plan", + "checks": [ + { + "command": "cd frontend", + "exitCode": 0, + "durationMs": 6, + "verdict": "pass" + }, + { + "command": "echo 'Build OK'", + "exitCode": 0, + "durationMs": 6, + "verdict": "pass" + }, + { + "command": "grep -q '__APP_VERSION__' vite.config.ts", + "exitCode": 2, + "durationMs": 8, + "verdict": "fail" + }, + { + "command": "grep -q 'AppFooter' src/App.tsx", + "exitCode": 2, + "durationMs": 8, + "verdict": "fail" + }, + { + "command": "test -f src/components/AppFooter.tsx", + "exitCode": 1, + "durationMs": 6, + "verdict": "fail" + }, + { + "command": "echo 'All checks pass'", + "exitCode": 0, + "durationMs": 7, + "verdict": "pass" + } + ], + "retryAttempt": 1, + "maxRetries": 2 +} diff --git a/.gsd/milestones/M006/slices/S06/tasks/T02-SUMMARY.md b/.gsd/milestones/M006/slices/S06/tasks/T02-SUMMARY.md new file mode 100644 index 0000000..65f0128 --- /dev/null +++ b/.gsd/milestones/M006/slices/S06/tasks/T02-SUMMARY.md @@ -0,0 +1,84 @@ +--- +id: T02 +parent: S06 +milestone: M006 +provides: [] +requires: [] +affects: [] +key_files: ["docker/Dockerfile.web", "docker-compose.yml"] +key_decisions: ["Used ARG+ENV pattern in Dockerfile.web so Vite process.env reads the build arg during npm run build", "Synced files to ub01 via SCP to avoid outward-facing git push without user confirmation"] +patterns_established: [] +drill_down_paths: [] +observability_surfaces: [] +duration: "" +verification_result: "All checks pass: VITE_GIT_COMMIT present in both Dockerfile.web and docker-compose.yml on ub01, docker compose config validates, build succeeds (48 modules), deployment succeeds, footer visible in browser with correct version/date/SHA/link. T01 file checks also pass with frontend/ prefix." +completed_at: 2026-03-30T12:05:25.222Z +blocker_discovered: false +--- + +# T02: Updated Dockerfile.web and docker-compose.yml on ub01 to pass VITE_GIT_COMMIT build arg, rebuilt and deployed — footer shows v0.1.0, build date, commit 08d7d19, and GitHub link + +> Updated Dockerfile.web and docker-compose.yml on ub01 to pass VITE_GIT_COMMIT build arg, rebuilt and deployed — footer shows v0.1.0, build date, commit 08d7d19, and GitHub link + +## What Happened +--- +id: T02 +parent: S06 +milestone: M006 +key_files: + - docker/Dockerfile.web + - docker-compose.yml +key_decisions: + - Used ARG+ENV pattern in Dockerfile.web so Vite process.env reads the build arg during npm run build + - Synced files to ub01 via SCP to avoid outward-facing git push without user confirmation +duration: "" +verification_result: passed +completed_at: 2026-03-30T12:05:25.222Z +blocker_discovered: false +--- + +# T02: Updated Dockerfile.web and docker-compose.yml on ub01 to pass VITE_GIT_COMMIT build arg, rebuilt and deployed — footer shows v0.1.0, build date, commit 08d7d19, and GitHub link + +**Updated Dockerfile.web and docker-compose.yml on ub01 to pass VITE_GIT_COMMIT build arg, rebuilt and deployed — footer shows v0.1.0, build date, commit 08d7d19, and GitHub link** + +## What Happened + +Copied T01 frontend changes to ub01 via SCP (including AdminDropdown.tsx which was missing). Updated docker/Dockerfile.web with ARG VITE_GIT_COMMIT=dev and ENV VITE_GIT_COMMIT=$VITE_GIT_COMMIT before the npm run build step. Updated docker-compose.yml with sed to add VITE_GIT_COMMIT build arg to the web service, following the same pattern as the API service. Built with real git SHA and deployed. Footer visible at http://ub01:8096 showing v0.1.0, build date, commit 08d7d19, and GitHub link. + +## Verification + +All checks pass: VITE_GIT_COMMIT present in both Dockerfile.web and docker-compose.yml on ub01, docker compose config validates, build succeeds (48 modules), deployment succeeds, footer visible in browser with correct version/date/SHA/link. T01 file checks also pass with frontend/ prefix. + +## Verification Evidence + +| # | Command | Exit Code | Verdict | Duration | +|---|---------|-----------|---------|----------| +| 1 | `ssh ub01 'grep -q VITE_GIT_COMMIT docker/Dockerfile.web'` | 0 | ✅ pass | 500ms | +| 2 | `ssh ub01 'grep -q VITE_GIT_COMMIT docker-compose.yml'` | 0 | ✅ pass | 500ms | +| 3 | `docker compose config --quiet` | 0 | ✅ pass | 1000ms | +| 4 | `docker compose build chrysopedia-web` | 0 | ✅ pass | 5100ms | +| 5 | `docker compose up -d chrysopedia-web` | 0 | ✅ pass | 3000ms | +| 6 | `grep -q '__APP_VERSION__' frontend/vite.config.ts` | 0 | ✅ pass | 10ms | +| 7 | `grep -q 'AppFooter' frontend/src/App.tsx` | 0 | ✅ pass | 10ms | +| 8 | `test -f frontend/src/components/AppFooter.tsx` | 0 | ✅ pass | 10ms | + + +## Deviations + +Had to copy AdminDropdown.tsx to ub01 (missing component). Used sed instead of Python yaml for docker-compose.yml to preserve formatting and comments. + +## Known Issues + +Docker files on ub01 are uncommitted working changes. Local workspace lacks docker/ directory — verification must run via SSH. + +## Files Created/Modified + +- `docker/Dockerfile.web` +- `docker-compose.yml` + + +## Deviations +Had to copy AdminDropdown.tsx to ub01 (missing component). Used sed instead of Python yaml for docker-compose.yml to preserve formatting and comments. + +## Known Issues +Docker files on ub01 are uncommitted working changes. Local workspace lacks docker/ directory — verification must run via SSH.