Skip to content
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

docs(render_com): update instructions #2536

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 10 additions & 24 deletions docs/2.deploy/20.providers/render.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,19 @@

:read-more{title="render.com" to="https://render.com"}

## Set up application
## Set up application (Runtime: Node)

1. [Create a new Web Service](https://dashboard.render.com/select-repo?type=web) and select the repository that contains your code.
2. Ensure the 'Node' environment is selected.
3. Update the start command to `node .output/server/index.mjs`
4. Click 'Advanced' and add an environment variable with `NITRO_PRESET` set to `render_com`. You may also need to add a `NODE_VERSION` environment variable set to `18` for the build to succeed ([docs](https://render.com/docs/node-version)).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are reasons we have explicit preset please keep it.

3. Update the build command to `npx nypm install && npm run build`
4. Update the start command to `node .output/server/index.mjs`
5. Click 'Create Web Service'.

## Infrastructure as Code (IaC)
## Set up application (Runtime: Bun)

1. Create a file called `render.yaml` with following content at the root of your repository.

> This file followed by [Infrastructure as Code](https://render.com/docs/infrastructure-as-code) on Render

```yaml
services:
- type: web
name: <PROJECTNAME>
env: node
branch: main
startCommand: node .output/server/index.mjs
buildCommand: npx nypm install && npm run build
envVars:
- key: NITRO_PRESET
value: render_com
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would keep this as alternative to web UI setup wizard.


1. [Create a new Blueprint Instance](https://dashboard.render.com/select-repo?type=blueprint) and select the repository containing your `render.yaml` file.

You should be good to go!
1. [Create a new Web Service](https://dashboard.render.com/select-repo?type=web) and select the repository that contains your code.
2. Ensure the 'Node' environment is selected.
3. Update the build command to `bun install && bun run build`
4. Update the start command to `bun run .output/server/index.mjs`
5. Click 'Advanced' and add an environment variable with `NITRO_PRESET` set to `bun`.
6. Click 'Create Web Service'.