react-wordle icon indicating copy to clipboard operation
react-wordle copied to clipboard

How can i run it on production without docker ?

Open noam2 opened this issue 3 years ago • 3 comments

Hello,

i have set a webserver + nginx + https. i can run the project in development on port 3000, and with nginx and ssl be able to see the app when i put in domain. thats all good. now i would like to run a production version BUT since im not good with docker + mixing nginx and ssl and just wanna push the app fast - im wondering how to build and run this in production mode, without using docker ? im just redirecting all traffic from port 80/443 now to port 3000 with nginx and would like for it to stay like that.

Thanks !

noam2 avatar Jul 18 '22 15:07 noam2

depends what you mean by running it in production, but I would suggest you look into deploying this via github actions, as referenced in another issue here, or indeed link your fork to netlify for it to be published there. Both of these solutions have free elements if you wanted to try it out, and you could probably do it all in a few minutes if you have knowledge of the platforms. This means you don't need you to deploy and maintain your own containers, not that there is anything wrong with that, of course. Have fun.

eyemokay avatar Jul 21 '22 14:07 eyemokay

You should run: npm run build and then just to copy the contents of ./build/ dir to your web root. For example: scp -rp build/* <user>@<host>:/var/www/html/

tomasliubinas avatar Jul 30 '22 21:07 tomasliubinas

Hey and thanks for the replies. I had no previous exp/ personally deploying a React app, so want ed to know how to do it w/ the most straightforward way. I myself come from the db/python world, and less the web, so this is all new to me.

But - luckily i was able to learn how to spin up a server, install linux, nginx, SSL w/ certbot and finally I run npm run build and mapped the build folder as @tomasliubinas suggested ! thanks a ton, i now know how to deploy a react app!

noam2 avatar Jul 31 '22 11:07 noam2