Deployment

What to know before running Sports Agents anywhere other than a development machine.

Status

The live site at sports-agents.openship.org runs on Railway with PostgreSQL and a Railway bucket, deployed from the default branch with railway.toml. Stripe runs in test mode there.

What the code expects

  • PostgreSQL with the checked-in migrations applied.
  • DATABASE_URL, SESSION_SECRET (32 or more characters), and PUBLIC_SIGNUPS_ALLOWED=false.
  • Stripe keys if you take card payments, and STRIPE_WEBHOOK_SECRET for the webhook at /api/integrations/payment/pp_stripe_stripe/webhook. Only test keys have been used.
  • All app processes share the same database and SESSION_SECRET.

Build and start

railway.toml is inherited from the starter. It builds with keystone build --no-ui && next build and starts with npm run migrate && next start. For any host:

npm run build
npm run migrate
npm start

Back up the database before you migrate.

After the first start

  1. Open /dashboard/init and create the first admin.
  2. Run setup from the sidebar, or enter your own agency, staff, and clients.
  3. Create PaymentProvider records through setup. Setup creates a Stripe provider and a manual provider.
  4. For card payments, register the webhook at /api/integrations/payment/pp_stripe_stripe/webhook. See Payment providers.

Before real money

  • Replace Stripe test keys with live keys only after you have reviewed the payment flow yourself.
  • The webhook route has not been exercised against a live webhook secret in development.
  • Apply your own legal, tax, and union-rule review. The app does not make compliance claims.

On this page