How to Use Docker Compose to Build and Run a Node.js and React.js Web Application
- Prerequisite
- Create a new repository on the command line
- Make it a git repo
git init
- Create a README.md for documentation
- Add to the local Git repository
- Commit the resources
- Create an empty remote Git repository on GitHub
- Add the local repository to remote:
git remote add origin https://github.com/gituser/this-git-repo.git
- Setup a Node.js backend
- Create a React.js fronend
- Write Dockerfiles
- Create a Dockerfile for Node.js backend
- Create a Dockerfile for React.js frontend
- Compose Configuration
- Write Docker Compose YAML file
- Build and start the Docker container