Questions about deploying a Next.js/Strapi application

I’m currently working on a portfolio that I would like to push up to Render for everyone to see, containing a list of my projects, my education, etc. This portfolio utilizes Next.js, runs on Node.js and uses the Strapi CMS from which it gets the dynamic content from. Anyway, there’s several questions I have that I would like answered before I deploy.

  1. According to the docs on how to deploy a Next.js app on Render, I need to use the build command “yarn; yarn build” and the start command “yarn start”. My Next.js app uses NPM for package management, not Yarn. Like I said, it runs with Node.js. Do I still need to use yarn commands?
  2. I’ve already deployed two Node.js applications on Render. For both of them, the build command is “npm install” and the start command is “node database.js”. Of course, neither of those two applications used Next.js. How similar or different would deploying a Next.js application that runs on Node.js be? Would the build/start commands be similar or different? What exactly would they be?
  3. Like I said, my Next.js application pulls information from Strapi. I assume I’d deploy my Strapi application separately. I also used Node.js for Strapi. How similar or different would that be? What would the build and run commands be for the Strapi deployment?
  4. According to the docs for deploying Strapi on Render, it looks like deploying Strapi on Render will not be free. I have a few questions about this. Firstly, how much will it cost to have a Strapi application on Render? What is my cheapest option? I was under the assumption that deploying any Node.js applications on Render would be free. Is that not true for Strapi? Do I absolutely have to pay to deploy Strapi on Render?
  5. Those aforementioned docs talked about forking a repository from GitHub. I’ve already done quite a bit of work on both my Next.js and Strapi applications locally. Do I need to start all over, fork those repositories and copy my current code over into the forked Next.js repository and recreate all the content types and fill in all the information again in the forked Strapi repository? Or is there a way I can keep my current local Next.js and Strapi applications and modify them so that they match those repositories? What’s the simplest way to do this? Some step-by-step instructions would be helpful.

If anyone can answer these questions for me, that would be most helpful! Thanks!
-Simeon

Hi Simeon,

  1. You can use npm to start your service.
  2. I’d start by trying essentially whatever you run locally to spin your service up. For most node apps, npm start should do the trick. But ultimately this depends on your service and what you have in your package.json, etc.
  3. I think this question should be answered by working through the Strapi quick start: https://docs.render.com/deploy-strapi
  4. The cost will depend on which of the multiple approaches you take. If you click the deploy to render buttons, you’ll see an estimated cost before you actually deploy the services.
  5. The instruction to fork the repo only applies to if you are attempting to deploy one of our sample repos. If you already have a repo you’re working on, no need to create another fork. That being said, it might be useful for you to start by deploying some of these examples so you get a feel for how everything works.

Regards,

Matt

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.