Replies: 3 comments 3 replies
-
You need to run server.js with node and serve public with nginx. Proxy nginx to server.js port. |
Beta Was this translation helpful? Give feedback.
2 replies
-
https://github.com/fivethreeo/razzle-with-docker-nginx/blob/master/docker-compose.yml - old example, use for ideas, do not copy ;) |
Beta Was this translation helpful? Give feedback.
1 reply
-
You need two running containers, three if you count build |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am having a hard time deploying my React app built with Razzle to a Docker container, with Nginx. I'm not really a DevOps guy, and only tried exploring things up. I would like to serve the build folder through Nginx.
Dockerfile
nginx.conf
env
Edit: (Forgot to add the output I got)
Since my nginx.conf is checking for the index.html file which is not in the build folder of my react app, I only got the default home screen of nginx, which shows that the web server is up and running. How can I make it so that it can read the build/server.js compiled by razzle?
Having a tear about this, hoping for some help. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions