I am new to docker and I am little confused. You have setup nginx in Dockerfile, now lets assume scenario where we have multiple react apps and we want to deploy on same server so its it multiple nginx instance running on same server? correct me if I misunderstood anything.
It means your react build static files from "/app/build" are not copied in the "/usr/share/nginx/html". Hence, nginx shows you the default static page. It could either be that you missed out on line: 19 in the dockerfile OR your app wasn't built correctly. See 8:35 If you're sure you performed the steps correctly, then you can go inside your container using docker exec -it {containerid} /bin/sh see docs.docker.com/engine/reference/commandline/exec/
Hey Ahsan, great video. It's one of the best on this topic I found but I got an error. "Step 9/13 : COPY --from=build /app/build /usr/share/nginx/html invalid from flag value build: pull access denied for build, repository does not exist or may require 'docker login': denied: requested access to the resource is denied" I was wondering if you could help me as to why this is? Cheers!
Hi Mate, thank you for contributing such great video. I was looking for the next video about the NGINX and load balancing tutorial. Would you mind to share with me the link? Thanks in advance
@@anirbanchakraborty690 the `build` at the very top is a name given to the node image, the `build` at line 15 is an npm command and the first `build` at line 19 refers to the react image defined at the top to access a folder in the path `/app/build` inside the react image. The folder `/app/build` is generated by the npm `build` command at line 15.
The keyword "as" should be enough to fix the confusion as "build" is just an alias used for the Node Image. Besides, no worries, I've updated the github!
Hii bro i really liked your vdo and earlier i came to know that u r currently in germany plz can help me can you contact me in personally bcoz im also from india and im planning to do further studies in germany so i have some questions about this so plz can i contact you personally
Been looking how to set it up for daaaays brother, this 4 yr old video saved me god bless your soul
Thank you Ahsan for this great tutorial.
Thank you for your explaining!!!!!
great video!
good stuff
Thanksssss!!!! ❤
Thankyou ashan but I have this error how to solve this ??
(no-referrer-when-downgrade) where to add header??
have you ever deployed it into K8s and accessed it on a URL via Nginx-ingress? how do u set context path ?
How can i add ssl certs in this method
Shamoon Ismail songs are dope!
Hello, Does CMD ["nginx","-g","daemon off"] starts NGINX service?
I love you
I am new to docker and I am little confused. You have setup nginx in Dockerfile, now lets assume scenario where we have multiple react apps and we want to deploy on same server so its it multiple nginx instance running on same server? correct me if I misunderstood anything.
i follow your step but result in 2 separate image , can you point our my problem ?
I followed the tutorial but I'm seeing "Welcome to Nginx!" page vs. my app on localhost. Any thoughts on how to fix it?
It means your react build static files from "/app/build" are not copied in the "/usr/share/nginx/html". Hence, nginx shows you the default static page.
It could either be that you missed out on line: 19 in the dockerfile OR your app wasn't built correctly. See 8:35
If you're sure you performed the steps correctly, then you can go inside your container using
docker exec -it {containerid} /bin/sh see docs.docker.com/engine/reference/commandline/exec/
Hello guys, I deployed react so that when I access the browser the screen is blank, would anyone know to tell me why?
you must add this code to pagekage.json file: homepage:"."
Hey Ahsan, great video. It's one of the best on this topic I found but I got an error.
"Step 9/13 : COPY --from=build /app/build /usr/share/nginx/html
invalid from flag value build: pull access denied for build, repository does not exist or may require 'docker login': denied: requested access to the resource is denied"
I was wondering if you could help me as to why this is?
Cheers!
I had the same issue, try with /app/build/* /usr/share/nginx/html/
totally confused by the usage of 'build' in the dockerfile.. can you please clear out the confusion!
It is updated, see github.
Hi Mate, thank you for contributing such great video. I was looking for the next video about the NGINX and load balancing tutorial. Would you mind to share with me the link? Thanks in advance
Why is the word "alpine" added to the nodejs version and nginx versions??
It is just a light-weight linux i use in docker.
@@ahsannasir6214 Thnx I read up on it.
I`ll suggest you rename `build` for the react node image to `react_build` to avoid confusions.
totally confused by the usage of 'build' in the dockerfile.. can you please clear out the confusion!
@@anirbanchakraborty690 the `build` at the very top is a name given to the node image, the `build` at line 15 is an npm command and the first `build` at line 19 refers to the react image defined at the top to access a folder in the path `/app/build` inside the react image. The folder `/app/build` is generated by the npm `build` command at line 15.
@@anirbanchakraborty690 check this gist if you are still confused - gist.github.com/blaZ3/239f27daf76857e4a0417490b3896c08
The keyword "as" should be enough to fix the confusion as "build" is just an alias used for the Node Image. Besides, no worries, I've updated the github!
Hii bro i really liked your vdo and earlier i came to know that u r currently in germany plz can help me can you contact me in personally bcoz im also from india and im planning to do further studies in germany so i have some questions about this so plz can i contact you personally