Welcome to the MeanStack Microservices Project! This project demonstrates a streamlined software development process using a 3-tier microservice-based approach. It leverages Docker, GitHub, and Docker Hub to accelerate development cycles.
In the fast-paced realm of software development, where innovation is constant and timelines are tight, this project provides a solution to accelerate development cycles. It demonstrates the synergy of Docker Compose, MongoDB, Express.js, Nginx, and a web interface to create a highly efficient and modular application architecture.
The project is structured into three main components:
- mongo-db: Manages the MongoDB database.
- app-server: Implements the business logic using Node.js and Express.js.
- web-server: Serves as the web interface with Angular.
Each component has its own directory with a Dockerfile and associated source code.
Make sure you have the following installed on your system:
-
Clone the repository:
git clone https://github.com/tallgray/MeanStack.git
-
Create the Docker network and volume NFS directory:
docker network create -d macvlan --subnet=10.220.0.0/24 --gateway=10.220.0.1 --ip-range=10.220.0.64/27 -o parent=eth0 LAN mkdir /mnt/nas/nfs-1/volumes/${PROJECT}_mongo-db
- The Docker network values for subnet, gateway, ip-range and parent should be customized to match your local environment and host machine. Using the bash command 'ip a' on your Docker host will help you to locate these specifics.
- The ${PROJECT} refers to the dotenv file variable, but this will not be read into the Docker host bash shell. So, you will need to define it to match the name of your project root folder. When cloning this repo, it will be named 'MeanStack'.
- If you do not have an NFS service that is mounted to the Docker host, you may remove the 'volumes:' definition sections from the Docker Compose YAML file. This will result in the mongo-db container no longer having persistent storage and therefore the database will be deleted each time the container is stopped or recreated.
-
Navigate to the project directory:
cd MeanStack
-
Update the .env file with your project-specific variables:
nano .env
-
Build and start the project using Docker Compose:
docker-compose up -d --build