Skip to content

Modernize web-app-serve: published validate-env package + helm wrapper chart - #29

Merged
thenav56 merged 4 commits into
developfrom
feat/web-app-serve-helm
Jul 17, 2026
Merged

Modernize web-app-serve: published validate-env package + helm wrapper chart#29
thenav56 merged 4 commits into
developfrom
feat/web-app-serve-helm

Conversation

@thenav56

@thenav56 thenav56 commented Jul 16, 2026

Copy link
Copy Markdown
Member

Changes

chore: — migrate to published @togglecorp/vite-plugin-validate-env

  • Replaces the retired git-fork dep @julr/vite-plugin-validate-env (git+…#v2.2.0-tc.1) with the published npm package @togglecorp/vite-plugin-validate-env@^2.2.1 (same API, ships overrideDefineForWebAppServe), updating imports in env.ts, vite.config.ts, src/declarations/env.d.ts.
  • web-app-serve/docker-compose.yml: overridable project name, dynamic vars inline with local defaults, .env now optional.

ci: — publish helm wrapper chart via web-app-serve-action@v0.2.0

  • Workflow renamed publish-web-app-serve.ymlhelm-publish.yaml; action bumped v0.1.1v0.2.0 (helm_publish: true); permissions widened with contents: read + pull-requests: read (provenance writer resolves the PR from the commit).
  • New wrapper chart web-app-serve/helm/ (timur-helm), depending on oci://ghcr.io/toggle-corp/web-app-serve-helm:0.1.1 aliased app. CI stamps image name/tag + provenance annotations and pushes the chart to GHCR on every develop push: oci://ghcr.io/toggle-corp/timur-helm, version 0.0.1-develop.c<sha>.

Verification

  • docker-compose smoke (web-app-serve/docker-compose.yml): HTTP 200, 0 leftover WEB_APP_SERVE_PLACEHOLDER__* markers in served files, runtime substitution + override confirmed.
  • Local helm check: helm dependency update + lint + template all pass.
  • Normal (non-WEB_APP_SERVE_ENABLED) pnpm build still passes.

TODO before/after merge

  • Remove the temporary feat/web-app-serve-helm entry from on.push.branches in .github/workflows/helm-publish.yaml — it exists only to test the publish workflow end-to-end on this branch (publishes to ghcr.io/toggle-corp/timur-dev / timur-dev-helm because of the slash in the branch name).

Notes for deployers (stock APP_ apply-config limitations, pre-existing)

The base image's stock apply-config has no sed-metachar escaping and no blank-unfilled step (upstream FIXME), so:

  • Avoid & or | in any runtime APP_* value (& silently corrupts the substituted value; | crashes the container at start).
  • Set every APP_* var explicitly at deploy time — use "" to opt out of optional ones (APP_UMAMI_SRC, APP_UMAMI_ID, APP_SENTRY_DSN). A truly-unset var leaks its literal placeholder into the bundle; unset umami vars ship a broken <script> tag in index.html.

🤖 Generated with Claude Code

@thenav56
thenav56 force-pushed the feat/web-app-serve-helm branch 2 times, most recently from 60599ce to 52a5a93 Compare July 16, 2026 13:42
thenav56 added 2 commits July 16, 2026 20:53
Replace the retired @julr git-fork dependency
(git+https://github.com/toggle-corp/vite-plugin-validate-env#v2.2.0-tc.1)
with the published npm package @togglecorp/vite-plugin-validate-env ^2.2.1,
which ships overrideDefineForWebAppServe and installs cleanly (no .npmrc
pnpm auto-switch workaround needed). Update all imports @julr/... ->
@togglecorp/... (env.ts, vite.config.ts, src/declarations/env.d.ts) and
refresh the lockfile.

Align web-app-serve/docker-compose.yml with current conventions: inline
dynamic-var defaults via ${VAR:-default} and an optional local .env,
overridable COMPOSE_PROJECT_NAME. Tidy stale nginx-serve wording.
Bump the publish workflow to the helm-capable action release
(toggle-corp/web-app-serve-action@v0.2.0), set helm_publish: true, and add
contents: read + pull-requests: read (the helm provenance writer resolves
the PR from the commit). Rename publish-web-app-serve.yml -> helm-publish.yaml
now that it publishes the chart too; keep submodules: true (backend schema).

Add the thin wrapper chart under web-app-serve/helm/: Chart.yaml (name
timur-helm, base web-app-serve-helm 0.1.1 aliased app, SET-BY-CICD version)
and values.yaml (app.fullnameOverride timur, SET-BY-CICD image placeholders,
pre-seeded app.ingress.annotations). CI resolves the image name/tag and
stamps provenance annotations on publish.
@thenav56
thenav56 force-pushed the feat/web-app-serve-helm branch from 52a5a93 to b56daf9 Compare July 16, 2026 15:08
@thenav56
thenav56 merged commit 337df91 into develop Jul 17, 2026
5 checks passed
@thenav56
thenav56 deleted the feat/web-app-serve-helm branch July 17, 2026 15:23
tnagorra pushed a commit that referenced this pull request Jul 27, 2026
Modernize web-app-serve: published validate-env package + helm wrapper chart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants