Railway
Railway is an application deployment platform. It can run connected services such as an API, a background worker, and a database within one project.
What you can build or improve
Deploying a first release
Run the API and its database in one project the team can review in one place.
Background work
Send reminders or process imports in a service separate from the requests the API handles.
When we’d choose it
We’d consider it for a first release that needs a running server and persistent data, with a small team handling deployment.
Why use it
We can connect the repository and keep service configuration and logs together. That makes it easier to see what changed when a deployment fails.
What to consider
Before relying on the platform, we’d review usage, data persistence, and what the database needs for backups and recovery.
Illustrative example
First release of a booking portal
The API saves bookings in PostgreSQL. Another service sends pending reminders outside the booking confirmation flow.
Official documentation
Tools and how they fit together
An API, database, and worker can share a project without all running as one process.
API and background jobs
API and background jobs
Keep processes with different responsibilities separate. Each can have its own start command and logs.
- Railway Services
- Dockerfile
Persistent data
Persistent data
Keep data that must survive redeployment in a volume or database. Define how to create and restore a copy.
- Railway Volumes
- PostgreSQL
Environments and configuration
Environments and configuration
Keep test and production resources separate. Use variables to change connection settings or credentials without duplicating code.
- Railway Environments
- Railway Variables
Questions before you decide
Does deploying a database take care of backups?
Not by itself. Confirm what gets backed up, how long copies are kept, and how to restore one.
Can the API and worker be updated separately?
Yes, as separate services. Coordinate changes to shared data or messages so both versions keep working during the transition.
What should we check before growing the project?
Review each service’s actual usage, the resources it needs, and how long it would take to restore the database if something failed.