feat(shopify): Phase 3 hosting — pnpm Dockerfile, DATABASE_URL, prod URLs#118
Open
Omarear wants to merge 1 commit into
Open
feat(shopify): Phase 3 hosting — pnpm Dockerfile, DATABASE_URL, prod URLs#118Omarear wants to merge 1 commit into
Omarear wants to merge 1 commit into
Conversation
…URLs - multi-stage pnpm Dockerfile pinned by the app's own lockfile (corepack-pinned pnpm, prisma generate + build, prune --prod; alpine + openssl) - prisma datasource -> env(DATABASE_URL); dev keeps prisma/dev.sqlite via .env, prod must use a volume-backed path; migrations still run on boot - shopify.app.toml application_url/redirect_urls -> shopify.clankersupport.com (the §9 finding-1 webhook footgun) with a warning comment - .env.example documents the full env contract; packageManager pin; docker-start uses pnpm; dockerignore/prettierignore/gitignore adjusted - verified locally via the exact docker-start path: migrate deploy on a fresh DB, / 200, /auth/login 302 to OAuth install, unsigned webhook 400 - plan doc: §12b hosting runbook + go-live order; status line updated Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
❌ Some deployments failed
Deployed with Ploy |
Omarear
added a commit
that referenced
this pull request
Jul 4, 2026
- @shopify/shopify-app-session-storage-drizzle over a SESSION_DB D1 binding (ploy.yaml db:, wrangler.jsonc d1_databases) — the app's OWN database (shopify_sessions), never the api's llmchat_db; tokens are source-of-truth so they belong on db:, not the ephemeral state: binding - hand-authored migrations/0001_create_session.sql (house rule) + drizzle table twin in app/db/session.server.ts; the contract test applies the REAL migration SQL then runs the REAL adapter over it (store/load/find/delete/ upsert/expires round-trip) so schema-vs-DDL drift fails CI - delete the dual-dialect KV facade + its dialect tests in the same change — no dead second backend; memory fallback for `shopify app dev` stays - drop the remaining dead Node backend: prisma deps/dir/db.server.ts, Dockerfile/.dockerignore, docker/start/setup scripts, @react-router/serve (the Fly fallback lives intact on feat/shopify-hosting / PR #118) - wrangler.jsonc: no trailing commas — Ploy's CLI strips comments but parses strict JSON (prettierignored to keep it that way) - verified: 42/42 tests, tsc, lint; ploy build green (D1 binding recognized); wrangler/workerd boot with migration applied — SSR 200, HMAC 401/200, shop/redact through real D1 200, assets 200; shopify app dev boots Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Stacked on #117 (merge that first). Everything here is inside
apps/shopify+ the plan doc.What
pnpm-lock.yaml(corepack-pinned pnpm@10.0.0 baked at image-build time,prisma generate+react-router build,pnpm prune --prod, alpine + openssl). Build withdocker build -t clanker-shopify apps/shopify.datasource.url = env("DATABASE_URL"). Dev unchanged (.env→prisma/dev.sqlite); production must point at a volume (file:/data/prod.sqlite) or redeploys wipe every shop's tokens. Migrations still run on boot.application_url/redirect_urlsnowhttps://shopify.clankersupport.com— fixes the §9 finding-1 footgun (deploy snapshots these; the placeholder silently ate an APP_UNINSTALLED webhook during testing)..env.exampledocuments the full env contract;docker-startuses pnpm; plan doc gains §12b (hosting runbook + go-live order).Verification
No Docker on the dev machine, so the image's exact runtime path was run directly:
docker-start(→prisma migrate deployon a fresh DB →react-router-serve) with production env —/200,/auth/login?shop=…302 to the OAuth install URL, unsigned webhook POST → 400. Plus the full gate set: 39/39 vitest, lint,build:app,prisma generate.Still needed to go live (not in this PR)
Host account + volume (Fly.io recommended), DNS for
shopify.clankersupport.com, host secrets per.env.example, thenshopify app deployto release the config with real URLs.🤖 Generated with Claude Code