
Deploy MetricsDock
Shopify Partner analytics with a web app, worker, PostgreSQL, and Valkey.
Just deployed
/var/lib/postgresql/data
Just deployed
worker
Just deployed
Valkey
Just deployed
/data
Deploy and Host MetricsDock with Railway
MetricsDock is an open-source, standalone analytics SaaS for Shopify app developers. It imports Shopify Partner API data and turns it into auditable revenue, customer, churn, shop, and App Store performance reports without running as an embedded Shopify app.
About Hosting MetricsDock
This template deploys the complete production stack: a TanStack Start web application, a BullMQ worker, PostgreSQL, and Valkey. Railway builds the web and worker from the same public repository, connects them to the database and queue over private networking, provisions persistent volumes, runs committed Drizzle migrations before the web process starts, and exposes the application with a health-checked public domain.
You provide authentication and encryption secrets during deployment. Shopify Partner credentials are added later inside MetricsDock and remain scoped to the active Better Auth organization.
Common Use Cases
- Track Shopify app revenue, MRR, churn, customers, and shop activity.
- Retain raw Partner API events and transactions for auditable reporting.
- Run scheduled Partner data syncs through a dedicated background worker.
- Analyze Shopify App Store listing performance with an optional GA4 connector.
- Operate multiple organization-scoped analytics workspaces.
Dependencies for MetricsDock Hosting
- PostgreSQL for application and analytics data.
- Valkey for BullMQ jobs and production query caching.
- Better Auth for accounts, passkeys, sessions, and organizations.
- Shopify Partner API access with
Manage apps; financial reports also requireView financials. - Optional Google Analytics Data API credentials and Plunk transactional email credentials.
Deployment Dependencies
Set BETTER_AUTH_URL to your public application URL. For the Railway-provided domain, use https://${{app.RAILWAY_PUBLIC_DOMAIN}}. Generate strong, independent values for BETTER_AUTH_SECRET, ENCRYPTION_KEY, and CRON_SECRET, and keep the encryption key stable.
Google Analytics and Plunk are optional for basic product use; placeholder values can be supplied initially, then replaced when those integrations are enabled. Google OAuth must register https://your-domain.example/api/google-analytics/oauth/callback as an authorized redirect URI.
After deployment, create an account and add your organization-scoped Shopify Partner connection and Partner app IDs in Settings. MetricsDock currently targets Shopify Partner API 2026-04.
Implementation Details
The app service runs pnpm run db:migrate before starting and checks /api/health. The worker runs pnpm run worker. PostgreSQL and Valkey use private service references and persistent volumes, so no database or queue credentials need to cross the public network.
Why Deploy MetricsDock on Railway?
Railway deploys the application, worker, database, queue, private networking, persistent storage, and public domain as one coordinated project. You get observable services and repeatable deployments without assembling the infrastructure by hand, while retaining the ability to scale each process independently.
Template Content
PGDATA
PGPORT
POSTGRES_DB
POSTGRES_USER
SSL_CERT_DAYS
RAILWAY_DEPLOYMENT_DRAINING_SECONDS
worker
djordje-st/metricsdockValkey
valkey/valkey:latestVALKEY_PORT
VALKEY_USER
