Repository navigation
fix(SKY-9781): port prebuilt-UI Dockerfile + entrypoint from cloud - #5998
Merged
celalzamanoglu merged 4 commits intoJun 4, 2026
Merged
Conversation
Brings the prebuilt UI image (`public.ecr.aws/skyvern/skyvern-ui:latest`) in line with cloud's #9115: multi-stage build, `node:24.14-slim`, `npm ci`, larger Node heap for Vite rollup, additional `VITE_*` placeholders (Clerk, PostHog, environment, log artifacts, code block, API path prefix, 2FA notifications), safer entrypoint (`set -euo pipefail`, `escape_sed()` w/ multi-line guard, scoped sanity-check grep, EXIT trap, `wait -n`, batched `find -exec +`), and a per-Dockerfile `Dockerfile.ui.dockerignore` so the build context only pulls `skyvern-frontend/` + the entrypoint. OSS-specific preservations vs. cloud: - Keep `ARG APP_VERSION` (build-docker-image.yml passes it). - Keep `VITE_BROWSER_STREAMING_MODE` placeholder (still read by the frontend; docker-compose sets it to `cdp` for self-hosters). - Keep `SKYVERN_CREDENTIALS_FILE` / `/app/.skyvern/credentials.toml` fallback (the OSS path; `.streamlit/secrets.toml` is the legacy path the doctor migrates away from). Both `__SKYVERN_API_KEY_PLACEHOLDER__` and `YOUR_API_KEY` now fall through to the credentials file. Cloud production unaffected (frontend runs on Vercel). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
celalzamanoglu
requested review from
marcmuon,
suchintan and
wintonzheng
and removed request for
suchintan
May 18, 2026 15:13
marcmuon
approved these changes
May 20, 2026
marcmuon
left a comment
Contributor
There was a problem hiding this comment.
LGTM. Clean port: multi-stage build, layer caching, signal handling via tini, and post-replace sanity grep against Vite-mangled placeholders. OSS/cloud boundary respected.
Drop 5 placeholders that no OSS code path reads or that aren't documented self-hoster knobs: - VITE_CLERK_PUBLISHABLE_KEY, VITE_PUBLIC_POSTHOG_HOST, VITE_PUBLIC_POSTHOG_KEY: referenced only in skyvern-frontend/cloud/ (ClerkProvider, cloud Providers), which is not synced to OSS and does not exist in this repo. The OSS app shell (src/App.tsx) hardcodes PostHog and has no Clerk. Baking placeholders for these replaced strings nothing reads. - VITE_ENVIRONMENT, VITE_API_PATH_PREFIX: read by src/ but not in skyvern-frontend/.env.example, so not advertised self-hoster knobs. The pre-existing image never had them (baked at build), so dropping returns them to the proven status quo. Placeholders now match skyvern-frontend/.env.example exactly (8 vars): the original 5 plus VITE_ENABLE_LOG_ARTIFACTS / VITE_ENABLE_CODE_BLOCK / VITE_ENABLE_2FA_NOTIFICATIONS. Keeping those three also fixes a latent bug where the build-time-only image silently ignored those documented .env knobs. Verified: image builds, container starts, sed replaces all placeholders, served bundle has none left. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
wintonzheng
approved these changes
Jun 3, 2026
| ENV VITE_ENVIRONMENT=__VITE_ENVIRONMENT_PLACEHOLDER__ | ||
| ENV VITE_API_PATH_PREFIX=__VITE_API_PATH_PREFIX_PLACEHOLDER__ | ||
| ENV VITE_ENABLE_2FA_NOTIFICATIONS=__VITE_ENABLE_2FA_NOTIFICATIONS_PLACEHOLDER__ | ||
| ENV VITE_CLERK_PUBLISHABLE_KEY=__VITE_CLERK_PUBLISHABLE_KEY_PLACEHOLDER__ |
Contributor
There was a problem hiding this comment.
Why do we need clerk and posthog keys in OSs?
celalzamanoglu
deleted the
celal/sky-9781-port-prebuilt-ui-dockerfile-to-oss
branch
June 4, 2026 06:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Dockerfile.ui(builder + runtime),node:20.12-slim→node:24.14-slim,npm ci,NODE_OPTIONS=--max-old-space-size=4096, 8 newVITE_*placeholders (Clerk, PostHog, environment, log artifacts, code block, API path prefix, 2FA notifications).entrypoint-skyvernui.sh:set -euo pipefail,escape_sed()with multi-line guard, 13 sed rules, scoped post-replacement sanity-check grep, EXIT trap for orphan cleanup,wait -n, batchedfind -exec +.Dockerfile.ui.dockerignoreso the UI build context only pullsskyvern-frontend/and the entrypoint script (excludes host-sidenode_modules,dist,.env*).OSS-specific deviations from skyvern-cloud
ARG APP_VERSION:build-docker-image.ymlpassesAPP_VERSION=\${{ github.sha }}as a build-arg; dropping it would break version baking.VITE_BROWSER_STREAMING_MODEplaceholder: still read by the frontend (skyvern-frontend/src/util/env.ts:14); docker-compose injectscdpfor self-hosters. Dropping the placeholder would silently forcevnc.SKYVERN_CREDENTIALS_FILE//app/.skyvern/credentials.toml(the volume-mounted path in docker-compose)..streamlit/secrets.tomlis the legacy path the OSS doctor migrates away from (skyvern/cli/doctor.py:31). Both__SKYVERN_API_KEY_PLACEHOLDER__andYOUR_API_KEYare filtered (aligned with frontend'sPLACEHOLDER_VALUES).Test plan
docker build -f Dockerfile.ui --build-arg APP_VERSION=test .succeeds on multi-stage build.build-docker-image.ymlbuilds the UI image successfully on next release (cloud prod unaffected — runs on Vercel).:latestafter publish and verify Clerk/PostHog/environmentVITE_*overrides are honored at runtime.🤖 Generated with Claude Code