Skip to main content

Deploy to Railway

Built your app with Laradock? Ship it to Railway without changing your stack. Railway builds the self-contained image (nginx + php-fpm) from the production Dockerfile and injects $PORT, which the image honors.

1. Add the config

Copy the ready railway.json to your project root. It tells Railway to build from laradock/production/Dockerfile and health-check /.

2. Deploy

railway init
railway up

Or connect the repo in the Railway dashboard, it deploys on every push. Set env vars (DB_HOST, DB_PASSWORD, APP_KEY) in the service settings.

Notes

  • Managed database. Add Railway Postgres and Railway Redis as plugins, or use a managed provider.
  • Secrets are service variables, never in the image.

Deploying elsewhere? The full deploy guide covers every target, Kubernetes, ECS, Cloud Run, Fly, and more.