Deploy React App in Docker using Nginx

Publié le: 30 octobre 2021
sur la chaîne: Aveti Tutorials
19,712
160

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

1. Create a react application or clone from https://github.com/avetichamp/aveti-r...
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:
Git Hub: https://github.com/avetichamp/aveti-r...
Facebook :   / aveti.tutorial.9  

Please subscribe to this channel


Sur cette page du site, vous pouvez voir la vidéo en ligne Deploy React App in Docker using Nginx durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Aveti Tutorials 30 octobre 2021, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 19,712 fois et il a aimé 160 téléspectateurs. Bon visionnage!