Railway, deploy your applications in PHP, Python web, Node... like on Heroku for FREE
Content Index
I want to tell you about this interesting application that allows us to deploy our applications.
It's similar to Heroku, except the latter no longer offers a free plan. It works in a very similar way, automating many processes and making it easier to publish projects.
Railway is simply a platform for deploying our applications in the cloud and seeks to simplify developers' lives. It allows you to deploy applications such as Laravel, Node.js, Python (Flask, Django, FastAPI), Ruby, Go, PHP, etc. quickly and easily.
Railway allows you to publish applications in several ways, but the easiest is through its integration with GitHub.
Railway allows you to:
- Detect changes in repositories and deploy from the GitHub repository.
- Configure databases such as MySQL, PostgreSQL, and others, and includes an internal management system.
- CLI system to run commands directly in the container or query data or status.
- View different types of logs for each phase, from build to deployment.
- Customize each step, from build to deployment to runtime, using the CLI.
- Manage environment variables directly from the Dashboard.
- It has several automated processes and scripts that automatically detect and execute. For example, if you have a requirements.txt file, it knows it's Python and automatically installs the dependencies.
- Use Docker containers with all the flexibility this gives us: Automatically build a container image with your code.
- You don't need to write a Dockerfile if you don't want to, but you can if you need full control over how your application is built.
Finally, Railway has a free mode, which gives $5 of credit, which is ideal for use in test projects, presentations to clients, or demonstrations.
What I like most is that it's not limited to the terminal; we can publish directly from GitHub, which makes integration very straightforward. Once the application is uploaded, we only need to worry about the necessary settings: connecting the database, installing the server (for example, in Python Web we usually use Uvicorn), and other details.
- Process Automation
- We can configure steps to run automatically:
- At startup.
- During deployment.
- After deployment (for example, running migrations).
Overall, the app allows us to simplify the workflow quite a bit. That's why I recommend it.
Also, this link will be an affiliate link, in case you want to support me. I use it because I really liked it, and it's one of the few platforms that allows you to deploy multiple technologies: Laravel, Flask, FastAPI, CodeIgniter, etc.
Experiences with different frameworks
I've managed to deploy almost all of these technologies.
The good thing is that they also offer a free plan, ideal for practicing and uploading personal projects or demos.
In my case:
- Django, Flask, and Laravel → worked without any issues (although I'm using Laravel in demo mode).
- FastAPI → I haven't started the process yet.
- CodeIgniter 4 → was the most complicated, as it requires publishing via Nginx directly to Docker.
- E-commerce with Laravel
The application I've worked on the most is the online store with Laravel.
It works well, but I had an issue with a specific blog route, which wouldn't load even though it worked perfectly locally.
Everything else—login, authentication, and purchases—worked without a problem.
This shows that the platform can have its own peculiarities, and sometimes something doesn't work for no clear reason.
Dashboard and integration with GitHub
When creating your account, I recommend doing so with GitHub for direct integration with your repositories.
The dashboard allows you to create containers, upload projects from GitHub, and easily manage them.
We can even configure:
- Automatic deployment when git pushes to the main branch.
- Manual deployment, if you prefer to work on other branches.
- Databases.
We can also create databases directly from the dashboard.
Although it includes a complete visual manager, it doesn't have the option to import SQL, which is odd.
However, we can work with PostgreSQL, MySQL, SQLite, etc.
An important detail: Laravel didn't work well with SQLite in Docker (because of how it handles sessions), so I had to switch to a traditional database since, with SQLite, it switches to read-only mode within the Docker container.
Other features
- Configurable environment variables in multiple formats.
- Logs accessible from the dashboard for debugging errors during deployment.
- Integrated CLI for running commands in the container, migrations, seeds, etc.
Free plan
The platform offers 5 free credits per month.
When these are depleted, the containers are automatically deactivated and reactivated when the credits are renewed the following month.
Conclusion
In short, this tool allows you to easily deploy applications in multiple languages (Python, PHP, Ruby, Go, Node, etc.), with GitHub integration, databases, CLI, and logs included.
It's an excellent option for practicing, creating demos, or showing projects to clients or students.
I've left the link to Railway:
I agree to receive announcements of interest about this Blog.
Let's learn a structure to deploy your applications for FREE in Laravel, CodeIgniter, Flask, FastAPI, Django, Node, Go, and many more.