---
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.
