feat: Updated Dockerfile.web and docker-compose.yml on ub01 to pass VIT…
- "docker/Dockerfile.web" - "docker-compose.yml" GSD-Task: S06/T02
This commit is contained in:
parent
e6ce650487
commit
2e9ef20e24
3 changed files with 133 additions and 1 deletions
|
|
@ -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/`.
|
||||
|
|
|
|||
48
.gsd/milestones/M006/slices/S06/tasks/T01-VERIFY.json
Normal file
48
.gsd/milestones/M006/slices/S06/tasks/T01-VERIFY.json
Normal file
|
|
@ -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
|
||||
}
|
||||
84
.gsd/milestones/M006/slices/S06/tasks/T02-SUMMARY.md
Normal file
84
.gsd/milestones/M006/slices/S06/tasks/T02-SUMMARY.md
Normal file
|
|
@ -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.
|
||||
Loading…
Add table
Reference in a new issue