How to deploy create-react-app in Docker with docker-compose with NGINX

In this post, You will learn how to deploy create-react-app in Docker with docker-compose with NGINX as reverse-proxy.

To dockerise the create-react-app please follow the steps below:

1. Create a Project folder

2. Install create-react-app Installation Instructions

3. Create a react.js project

4. Create a Dockerfile inside web folder

5. Copy all the below content of the Dockerfile

6. Change directory to the parent folder

7. Create docker-compose.yml file

8. Copy the following to the file

9. Change directory to the nginx folder

10. Create nginx.conf file

11. Copy the following contents to the nginx.conf file

12. Execute docker-compose in root folder

If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.

Recommended Posts:


Prem Tiwari

An engineer by profession and a passionate blogger by heart. Founder of FreeWebMentor.com (A Programming blog for beginners), Tech Speaker at various forums. A part from this he is an open source enthusiast, WordPress Lover, Blogger, SEO, and Growth Strategic.