Deploy React App in Docker using Nginx

preview_player
Показать описание
This tutorial shows deploying React app with Nginx in Docker. This approach can be used to dockerize react app in production environment with docker. It uses docker multistage build to build docker image.

Prerequisites
- Nodejs installed, Docker installed, docker-compose installed
IDE:
Visual Studio code

Steps

Stage 1: Create docker image for react application

Stage 2: Create nginx react app image uisng base image nginx:alpine

2. Create docker file
3. Create Docker compose file
4. Deploy react using Nginx server in docker

Build image:
docker-compose build

Deploy App:
docker-compose up
For Detached Mode deployment
docker-compose up -d

For source code clone:

Please subscribe to this channel
Рекомендации по теме
Комментарии
Автор

Thanks so much, man!! These stills keep helping so many people!
You've got yourself another subscriber! :D

edlingaon
Автор

It really helped me for deployment and thankyou so much, great work keep growing 🙏🏻

sanjeevkumarpatil
Автор

Top video. Very informative. Could you do a similar video for nginx, react and flask (or any other api framework) with Docker?

imransaid
Автор

Can we put both the react js and nginx image in a single docker file and pushed it to AWS ECR, because I have tried the same and ended with a single image works.

himansusekharmishra
welcome to shbcf.ru