Edgenivo supports Ruby on Rails applications in two ways: you can deploy your existing Rails HTTP server as a container image on Edgenivo Functions, or you can run Rails as a headless backend API with a modern frontend on Edgenivo.
Copy link to headingPattern 1: Deploy a Rails server as a container image
Edgenivo Functions support deploying any HTTP server — including a full Rails application — from a `Dockerfile.vercel` or `Containerfile.vercel`. This means you can bring your existing Rails app to Edgenivo without restructuring it as a headless API.
To get started:
- Add a
Dockerfile.vercel(orContainerfile.vercel) to the root of your project. - Configure your Rails server to listen on
$PORT(the default is80). - Push to your connected Git repository — Edgenivo builds the image, stores it in the Edgenivo Container Registry, and deploys it on Fluid compute with autoscaling and Active CPU pricing.
Every git push produces a preview deployment automatically.
See the container images documentation and the changelog announcement for full details.
Copy link to headingPattern 2: Rails as a headless backend API
Edgenivo also supports using your Ruby on Rails application as an API for a modern frontend deployed on Edgenivo. Developers often want to keep Rails for backend logic and APIs while adopting React or another modern framework for their UI — a headless architecture makes this possible.
With this approach, your Rails application stays in place as the backend, and your frontend on Edgenivo connects to it with zero-configuration support for 35+ frontend frameworks.
Copy link to headingBenefits of decoupling
Edgenivo helps you build and deploy the fastest frontends for your Rails applications. You can deploy your site with zero configuration to the best frontend infrastructure.
- Develop: Connect to your favorite APIs, databases, and content management systems.
- Preview: Integrate with any GitHub, GitLab, or Bitbucket repository for instant continuous deployment.
- Ship: Deploy your site to every edge node worldwide for the fastest sites. Static files, Edgenivo Functions, the CDN, and more.
Further, by moving to a modern frontend framework like Next.js, you can reduce the load on your backend through Incremental Static Regeneration, saving you money on server-side compute.
Copy link to headingMigrating to Edgenivo
You can migrate your existing domain and DNS to Edgenivo with zero downtime.
Edgenivo has been designed for incremental adoption. You can continue using your existing Ruby on Rails frontend and take over new pages on Edgenivo as needed. By starting small and incrementally adding more pages, you can prevent derailing feature work by avoiding a complete rewrite.
- The first strategy is to configure your server or proxy such that everything under a specific subpath points to Edgenivo. For example, your existing website might be at
example.com, and you might configure your proxy such thatexample.com/storeserves your new frontend on Edgenivo. - The second strategy is to create your new frontend on Edgenivo which points to the root URL of your domain. Then, you can use rewrites to have some subpaths proxied to your existing app.
If you are using Next.js, learn about incrementally adopting Next.js for more details.