Shopify / shopify-app-template-node

MIT License
860 stars 393 forks source link

[Help] Shopify App Deploy #1278

Closed devajmeireles closed 1 year ago

devajmeireles commented 1 year ago

Hey guys!

I'm building a new app using Shopify best practices. With that, I'm using the Node template with React. This app needs to interact with an external API. I was able to do that with no problems. Now I'm working on creating a test environment to test and demonstrate the application to my client.

I'm currently having a problem doing this. I don't know how I need to prepare the app to be hosted on a server like a private VPS. I know the Shopify CLI has commands like build that generate a dist folder inside the frontend, but what else do I need to do?

  1. Do I need a node running? How can I do this using pm2? When I tried to run node using something like npm run server I got an error - server command exists inside on package.json of web folder

  2. I also tried using the Dockerfile that exists in the Shopify app template, but I couldn't get it to run, I get an error when npm install is running inside the Dockerfile:

image

My app use Shopify Polariz, and following the recommendations of the Polariz I need to do that:

image

Someone can say me what I need to do exactly to solve this issue? Thank you!