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

Add docs on deploying to Render #11

Open
umar-ahmed opened this issue Nov 13, 2023 · 6 comments
Open

Add docs on deploying to Render #11

umar-ahmed opened this issue Nov 13, 2023 · 6 comments
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@umar-ahmed
Copy link
Collaborator

https://render.com/

@umar-ahmed umar-ahmed added documentation Improvements or additions to documentation good first issue Good for newcomers labels Nov 13, 2023
@R4Rohit23
Copy link

@umar-ahmed I would like to work on this documentation task.

@umar-ahmed
Copy link
Collaborator Author

@umar-ahmed I would like to work on this documentation task.

Hey @R4Rohit23 ! That's awesome.

The main thing you'll want to keep in mind is that the deployment really needs to do 4 things:

  1. Set environment variables
  2. Build the Next.js app
  3. Migrate the DB
  4. Expose port for web traffic

You can take a look at the template we have for Railway to get an idea.

I haven't used Render myself, so I don't know if it requires a docker image and/or supports volume mounts for sqlite. Maybe you can start by researching that and responding back on this issue 🙂

Thanks again for volunteering!

@R4Rohit23
Copy link

@umar-ahmed I don't know about Database migration concepts. I know only about that the Render platform takes Environment variables and connect the pre deployed project on Github to be re-deployed for production.

@umar-ahmed
Copy link
Collaborator Author

@umar-ahmed I don't know about Database migration concepts. I know only about that the Render platform takes Environment variables and connect the pre deployed project on Github to be re-deployed for production.

@R4Rohit23 Is there a way to run an arbitrary command in the terminal? Basically for the database migration, we just need to be able to run yarn db:push before starting the server

@R4Rohit23
Copy link

Yes We can do it in package.json file. To deploy any repo to render we need to pass a build command which is the starting point of any production level code. Like below code.

  "build": "npm install && npm install --prefix frontend && npm run build --prefix frontend"

@umar-ahmed
Copy link
Collaborator Author

umar-ahmed commented Nov 16, 2023

Nice okay. We do something similar in Railway, but in the start command. So I think this shows Render deployment is viable.

@R4Rohit23 if you can focus on getting it deployed to Render, we can then create a template out of it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants