Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/docker/Dockerfile.web
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,11 @@ RUN if [ -n "$GOOGLE_PLACES_API_KEY" ]; then \
>> compass.yaml; \
fi

# Measure boot gzip for logs; deploy must not fail on absolute bundle size.
ENV COMPASS_BOOT_SIZE_ENFORCE=0
RUN .github/perf/run-boot-size-check.sh
# Build with the compass.yaml written above (real API URL, PostHog, OAuth).
# Never run .github/perf/run-boot-size-check.sh here: it swaps in the
# placeholder compass.boot-size.yaml, which pointed staging at the wrong API.
# Boot size is gated per PR in boot-bundle.yml, not at deploy.
RUN cd apps/calendar-web && bun run build.ts

FROM oven/bun:1.3.14-slim AS runtime

Expand Down
9 changes: 7 additions & 2 deletions self-host/docker-compose.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -705,8 +705,13 @@ describe("staging deploy workflow", () => {
expect(bootConfig).toContain("posthog:");
expect(dockerfile).toContain("nodeEnv: ${NODE_ENV}");
expect(dockerfile).toContain("'posthog:'");
expect(dockerfile).toContain(".github/perf/run-boot-size-check.sh");
expect(dockerfile).toContain("COMPASS_BOOT_SIZE_ENFORCE=0");
// The image must build with its own deploy compass.yaml. The boot-size
// script swaps in placeholder config (fake API URL and PostHog key).
expect(dockerfile).toContain(
"RUN cd apps/calendar-web && bun run build.ts",
);
expect(dockerfile).not.toContain("RUN .github/perf/run-boot-size-check.sh");
expect(dockerfile).not.toContain("COMPASS_CONFIG_FILE");
});

it("builds cloud deploy web images from a GitHub-only Dockerfile with PostHog config", () => {
Expand Down
Loading