shopify-app-deployment
Shopify App Deployment Strategy
Deploying Shopify apps is different from standard websites because of Webhooks, Admin API Rate Limits, and OAuth handshakes.
1. The "Vercel Problem" (Timeouts)
Vercel Serverless functions have a timeout (usually 10s-60s).
- Issue: Shopify bulk operations, product syncs, or installing the app on a large store can take >60s.
- Result:
504 Gateway Timeoutand broken installs.
Solution A: Remix on Vercel (Hybrid)
- Use Vercel for the UI.
- Offload long tasks (syncing) to a separate worker (Cloudflare Workers, Inngest, or separate VPS).
- Use
Deferin Remix to stream UI while backend works (but doesn't fix hard timeouts for the main thread).
Solution B: VPS / Docker (Recommended for Serious Apps)
Deploying to a persistent server (Fly.io, Railway, DigitalOcean, Hetzner) eliminates timeouts.
- Tooling: Coolify (self-hosted Vercel alternative), Dokku, or manual Docker.
2. Deployment Checklist
A. Environment Variables
Ensure these are set in your CI/CD or platform secrets:
SHOPIFY_API_KEYSHOPIFY_API_SECRETSCOPES(must match exactly what's in code)SHOPIFY_APP_URL(The public HTTPS URL, e.g.,https://app.mytitle.com)DATABASE_URL
B. Database Migrations
Run migrations during the build or as a release phase command.
- Fly.io: Use
release_commandinfly.toml. - Docker: Can run
npx prisma migrate deployin theCMDscript before starting the app.
C. Build Command
Ensure you build for production:
npm run build
# Ensure this runs `remix build` and copies necessary public assets
3. Platform Specifics
Fly.io
Excellent for Shopify apps due to global regions and Docker support.
fly.toml example:
[build]
dockerfile = "Dockerfile"
[env]
PORT = "3000"
[http_service]
internal_port = 3000
force_https = true
auto_stop_machines = true
auto_start_machines = true
Coolify / Hetzner
If you want to save money ($5/mo for a powerful VPS).
- Install Coolify on VPS.
- Connect GitHub Repo.
- Select "Nixpacks" or "Docker file".
- Set Environment Variables.
- Deploy.
4. Background Jobs (Crucial)
You MUST have a strategy for background jobs.
- Options:
- Redis + BullMQ: Requires a persistent Redis instance. (See
redis-bullmqskill). - Inngest / Trigger.dev: Serverless background jobs. Good if you don't want to manage Redis.
- Redis + BullMQ: Requires a persistent Redis instance. (See
5. Post-Deployment Verification
- Install Test: Install the app on a Development Store.
- Webhook Test: Trigger a webhook (e.g., update a product) and check server logs.
- App Proxy: If used, verify the proxy URL loads correctly (CORS errors are common here).
More from toilahuongg/google-antigravity-kit
shopify-liquid
Guide for using the Liquid template language within Shopify Theme App Extensions and Themes. Use this skill when building App Embed Blocks, App Blocks, or modifying Shopify Themes.
50shopify-polaris-design
Design and implement Shopify Admin interfaces using the Polaris Design System. Use this skill when building Shopify Apps, Admin extensions, or any interface that needs to feel native to Shopify.
47docusaurus-generator
Generate end-user documentation site using Docusaurus 3.x from the current project. Use this skill when the user asks to create documentation, generate docs, build a docs site, or set up Docusaurus for their project. Supports analyzing project structure, generating markdown docs, configuring Docusaurus, and creating user guides.
31shopify-remix-template
Guide for developing Shopify apps using the official Shopify Remix Template. Covers structure, authentication, API usage, and deployment.
19remotion-best-practices
Best practices for Remotion - Video creation in React
18remixjs-best-practices
Best practices for Remix (2025-2026 Edition), focusing on React Router v7 migration, server-first data patterns, and error handling.
15