-
-
Notifications
You must be signed in to change notification settings - Fork 746
feat: add sevalla preset #3554
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: add sevalla preset #3554
Conversation
|
@olawanlejoel is attempting to deploy a commit to the Nitro Team on Vercel. A member of the Team first needs to authorize it. |
| 1. [Create a new app](https://docs.sevalla.com/applications/get-started/add-an-application) on Sevalla and connect it to your Git repository. | ||
| 2. Set the **application name**, **region**, and **pod size** (you can start with 0.5 CPU / 1GB RAM). | ||
| 3. Click **Create**, but skip the deploy step for now. | ||
| 4. In your Sevalla application dashboard, click **Environment variables** on the sidebar and set `NITRO_PRESET` to `sevalla`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could svella CI somehow set this env? (or if it has a known env variable, we can add it to std-env for zero config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am trying to know how we can go about this internally. But at the moment this works this way. Can we maybe merge this way and then later the team can come back to this @pi0 .
| ```json [package.json] | ||
| { | ||
| "engines": { | ||
| "node": "22.x" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a hard requirement to deploy on svella or a recommendation? (If recommendation only, I suggest using a > [!TIP] note below and reducing initial steps)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's actually a hard requirement. Nixpacks is our default builder, and it uses Node 18, while modern Nitro apps require Node 20+.
Without specifying the Node version in package.json, deployments fail with an oxc-parser error related to optional dependencies. Setting "node": "22.x" in the engines field is necessary to ensure Nixpacks uses the correct Node version for the build.
I've updated the documentation to clarify this requirement and explain why it's needed.
src/presets/sevalla/preset.ts
Outdated
| const sevalla = defineNitroPreset( | ||
| { | ||
| extends: "node-server", | ||
| serveStatic: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't svella CDN serve static assets itself?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback! You're absolutely right. Sevalla offers a free Cloudflare-powered CDN that can serve static assets efficiently.
I've updated the preset to remove serveStatic: true and added a "Static Assets" section in the documentation explaining how users can enable Sevalla's CDN for optimal performance. I think this approach is cleaner and leverages Sevalla's infrastructure rather than having the Node server handle static files.
|
@olawanlejoel feel free to join Nitro discord if you like to followup over chat. |
8fee7c2 to
451a774
Compare
|
Hi @pi0, I attended to the comments you raised |
π Linked issue
β Type of change
π Description
Sevalla is a modern cloud platform for hosting applications, databases, object storage and static sites, offering a simple and scalable deployment experience.
This PR introduces a new preset named
sevalla, allowing users to easily deploy their Nitro apps to Sevalla with Node server support. The preset ensures compatibility and provides a straightforward deployment workflow.Additionally, the documentation has been updated with a dedicated Sevalla deployment guide, making it easy for users to get started and configure their environment.
π Checklist