Skip to content

fix(ci): fix streams preview deploy Dockerfile path doubling#1363

Merged
Kitenite merged 3 commits into
mainfrom
kitenite/fix-streams-preview-deploy
Feb 10, 2026
Merged

fix(ci): fix streams preview deploy Dockerfile path doubling#1363
Kitenite merged 3 commits into
mainfrom
kitenite/fix-streams-preview-deploy

Conversation

@Kitenite
Copy link
Copy Markdown
Collaborator

@Kitenite Kitenite commented Feb 10, 2026

Summary

  • Replace superfly/fly-pr-review-apps action with direct flyctl commands for streams preview deployment — the action resolved the Dockerfile path relative to the config file directory, doubling it (apps/streams/apps/streams/Dockerfile)
  • Fix fly.toml dockerfile path to be relative to its own directory
  • Add missing workspace deps (durable-session, ui, shared) to Dockerfile for the new session-based auth
  • Drop --frozen-lockfile since Docker builds use a workspace subset

Test plan

  • Streams preview deployment succeeds on Fly.io

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 10, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Replaces the preview workflow's single action with explicit setup and flyctl CLI steps (app create, secrets staging, deploy), updates production deploy to include repo-root context (flyctl deploy .), and adjusts Fly config and Dockerfile to use repo-root build context and include durable-session in build/runtime.

Changes

Cohort / File(s) Summary
Preview workflow
/.github/workflows/deploy-preview.yml
Replace fly-pr-review-apps action with setup-flyctl@master, then run `flyctl apps create ...
Production workflow
/.github/workflows/deploy-production.yml
Change deploy invocation from flyctl deploy --config apps/streams/fly.toml --remote-only to flyctl deploy . --config apps/streams/fly.toml --remote-only (adds explicit repo-root build context).
Fly config
apps/streams/fly.toml
Update dockerfile path from apps/streams/Dockerfile to Dockerfile; add comments clarifying Dockerfile is relative to fly.toml and flyctl deploy . sets repo-root build context for workspace COPY usage.
Dockerfile / build & runtime packages
apps/streams/Dockerfile
Expand build context copies and production installs to include workspace packages (agent, auth, durable-session, email, local-db, mcp, scripts, shared, trpc, ui) alongside db and streams; copy durable-session into builder and runtime images and adjust copy semantics/comments.

Sequence Diagram(s)

sequenceDiagram
    participant Runner as "GitHub Actions Runner"
    participant Flyctl as "flyctl (CLI)"
    participant Flyio as "Fly.io API"

    Runner->>Runner: checkout repo
    Runner->>Flyctl: setup-flyctl action installs flyctl
    Runner->>Flyctl: flyctl apps create <app> || true
    Flyctl->>Flyio: Create app request (tolerant)
    Runner->>Flyctl: flyctl secrets set ... --stage <stage>
    Flyctl->>Flyio: Stage secrets
    Runner->>Flyctl: flyctl deploy . --config apps/streams/fly.toml --app <app> --region <rgn> --remote-only
    Flyctl->>Flyio: Deploy request (with repo-root context)
    Flyio-->>Flyctl: Deployment status
    Flyctl-->>Runner: Exit code / result
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐇 I hopped into the CI with a tiny drum,
Replaced one click with commands that hum,
Secrets snugged, context set to root,
Durable sessions tucked in the boot,
The app sprang up — a carrot-cloud strum 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main fix: replacing the GitHub Action with direct flyctl commands to resolve the Dockerfile path doubling issue in the streams preview deployment.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The pull request description covers the main changes, related context, and includes a test plan checklist, meeting the template requirements.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch kitenite/fix-streams-preview-deploy

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 10, 2026

🚀 Preview Deployment

🔗 Preview Links

Service Status Link
Neon Database (Neon) View Branch
Fly.io Electric (Fly.io) View App
Fly.io Streams (Fly.io) View App
Vercel API (Vercel) Open Preview
Vercel Web (Vercel) Open Preview
Vercel Marketing (Vercel) Open Preview
Vercel Admin (Vercel) Open Preview
Vercel Docs (Vercel) Open Preview

Preview updates automatically with new commits

@Kitenite Kitenite force-pushed the kitenite/fix-streams-preview-deploy branch from ec1fd54 to 67f6514 Compare February 10, 2026 19:35
@Kitenite Kitenite force-pushed the kitenite/fix-streams-preview-deploy branch from 67f6514 to d26ae81 Compare February 10, 2026 19:45
@Kitenite Kitenite force-pushed the kitenite/fix-streams-preview-deploy branch from d26ae81 to 2f2116b Compare February 10, 2026 19:56
@Kitenite Kitenite force-pushed the kitenite/fix-streams-preview-deploy branch from 2f2116b to af12a17 Compare February 10, 2026 20:08
- Replace fly-pr-review-apps action with direct flyctl commands
  (the action doubled the Dockerfile path: apps/streams/apps/streams/Dockerfile)
- Fix fly.toml dockerfile path to be relative to config directory
- Add missing workspace deps (durable-session, ui, shared) to Dockerfile
- Drop --frozen-lockfile since Docker builds use a workspace subset
- Also fix production deploy with explicit build context
- Add missing STREAMS_INTERNAL_PORT and STREAMS_INTERNAL_URL env vars to fly.toml
- Restructure Dockerfile to copy source files explicitly instead of whole directories,
  preventing host node_modules (linker=isolated) from overwriting container deps
- Install deps after source copy so bun install results aren't overwritten
- Copy apps/streams/node_modules to runtime stage for workspace package resolution
- Add volume creation step to preview workflow for stream_data mount
…attern

- Switch preview from manual flyctl commands to fly-pr-review-apps action
- Add proper step names to production workflow for consistency
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.

1 participant