---
title: "Deploy MetricsDock"
description: "Shopify Partner analytics with a web app, worker, PostgreSQL, and Valkey."
category: "Other"
url: https://railway.com/deploy/metricsdock
---

# Deploy MetricsDock

Shopify Partner analytics with a web app, worker, PostgreSQL, and Valkey.

**[Deploy MetricsDock on Railway](https://railway.com/template/metricsdock)**

- **Creator:** Djordje Stevanovic's Projects
- **Category:** Other

## Template content

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

### app

- **Source:** https://github.com/djordje-st/metricsdock
- **Start command:** `pnpm run start`
- **Health check:** /api/health
- **Public domain:** Yes

### worker

- **Source:** https://github.com/djordje-st/metricsdock
- **Start command:** `pnpm run worker`

### Valkey https://res.cloudinary.com/h5kvzw/image/upload/v1713278076/Valkey-logo_yrnlsx.svg

- **Image:** valkey/valkey:latest
- **Start command:** `/bin/sh -c "exec docker-entrypoint.sh valkey-server --port ${VALKEY_PORT} --requirepass ${VALKEY_PASSWORD}"`

## Documentation

# 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 require `View 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.

## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — [Jul'26] Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — A Self-Hosted & Modern Roleplaying Platform
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

Open this page in a browser: https://railway.com/deploy/metricsdock
