thank you so much. keep it up. The way you teach this step by step is really amazing. I hope you follow this way in your future videos. Thanks again. 👍👍👍
hii! @umair I got this tricky problem do you think you can help me? So basically when i run build with env then all my values get hardcoded and if i run build without env then the process.env.url stays the same but it doesn't read values from .env file even after copying it to standalone output dir of build, i get undeifined. I have a backend code which was running at localhost:8000, so now when i create the nextjs frontend image and nodejs backend image and try to run them on k8s the backend url get changed so because of hardcoded values ,the frontend can't connect to backend now. I can run backend first then get the ip address and build the frontend image accordingly but in future if i make any change to my backend because of which i might get new ip address then again i have to rebuild my frontend image.Then all the cicd, and zero downtime strategy of k8s will be wasted.I tried official and other site but didn't actually helped.Even a short video will be helpful.Thank you.
Hey i have a doubt while using docker suppose we want to change some files and then see the changed code do we need to first copy the project on our local machine or we can change from docker container itself then how could you please explain??
if you are creating production build then name your .env either as .env.production or .env.local it will load env variable at build time but please note that all the values will be hardcoded.
When I update the code on my local machine, then it's not updated automatically in the browser. I tried docker compose watch, but not working. I use Windows. How can we do it? Thanks
Several seconds of your explanations of volumes is more useful for me than dozens of youtube videos/articles and stack overflow answers, Thank you.
Thank you, you done it with super simple excellent way, keep doing good work.
You're great Umair, thanks for sharing your knowledge
thank you so much. keep it up. The way you teach this step by step is really amazing. I hope you follow this way in your future videos. Thanks again. 👍👍👍
This playlist is really helpful, Thank you so much for providing such valuable content ❤
How can I use it like changes to reload. I test it. but not working
This was so helpful. Thanks!!
one of the best video ever seen
Thank you very much Umair!
Omg, thank you so much friend \o/ Another subscriber
Shouldn't the production build be the dist folder only with nginx and as small as 15mb, not the volumeless 2gb dev environment?
if I execute the "COPY . ." command at 10.38 before "RUN npm install", wouldn't I lose the benefits of Docker caching?
Hey mate, you make good videos but you should share link to repo.
why image size is too large for production
hii! @umair I got this tricky problem do you think you can help me? So basically when i run build with env then all my values get hardcoded and if i run build without env then the process.env.url stays the same but it doesn't read values from .env file even after copying it to standalone output dir of build, i get undeifined. I have a backend code which was running at localhost:8000, so now when i create the nextjs frontend image and nodejs backend image and try to run them on k8s the backend url get changed so because of hardcoded values ,the frontend can't connect to backend now. I can run backend first then get the ip address and build the frontend image accordingly but in future if i make any change to my backend because of which i might get new ip address then again i have to rebuild my frontend image.Then all the cicd, and zero downtime strategy of k8s will be wasted.I tried official and other site but didn't actually helped.Even a short video will be helpful.Thank you.
Hi! Did you got any solution to this problem, I'm facing this issue a lot and having a lot of tech debt due to it?
@@NitinSharma00001
No Bro :(
Can we access NEXT_PUBLIC_ prefix env variable in docker.. because it’s giving me undefined in docker environment
same here
How would you use docker compose watch with this?
Hey i have a doubt while using docker suppose we want to change some files and then see the changed code do we need to first copy the project on our local machine or we can change from docker container itself then how could you please explain??
How will i set client env variable in next js with docker.. it giving me undefined in docker environment
if you are creating production build then name your .env either as .env.production or .env.local it will load env variable at build time but please note that all the values will be hardcoded.
and one more thing if you are running dev then follow the video guide.
When I update the code on my local machine, then it's not updated automatically in the browser. I tried docker compose watch, but not working. I use Windows. How can we do it? Thanks
In development you can use a bind mount
if you are using docker compose and declare a ports like: 3000:300 you are no need to expose port in dockerfile
i am waiting for CI/CD :)
Already published on my channel
@@ProgrammingwithUmair321 I will check it thank you. you are doing great job :)
fetching on server side dont work
No repo link? (- _ - )
[Error: ENOENT: no such file or directory, open '/app/.next/BUILD_ID']