Backend microservices repository for SplitNest. This repository contains multiple microservices managed through Docker Compose, along with scripts to automate dependency installation, cleanup, and Docker management.
Make sure you have the following installed on your system:
- Node.js (with Yarn or npm)
- Docker and Docker Compose
Before running any commands, ensure that the shell scripts have executable permissions. Run the following commands to allow execution:
chmod +x install_all.sh
chmod +x cleanup.shAfter setting up the permissions, run the following commands to install all dependencies for each microservice and for the root project:
yarn install_all
yarnThis will:
- Run the
install_all.shscript to install dependencies for all microservices. - Install any dependencies defined in the root
package.json.
Here’s a list of useful commands that are available through yarn:
yarn install_allThis runs the install_all.sh script, installing dependencies in all microservices.
yarn cleanupThis runs the cleanup.sh script, which removes node_modules/, package-lock.json, and yarn.lock from each microservice.
yarn buildThis will run docker compose build to build Docker images for all microservices.
yarn upThis will run docker compose up to start all the microservices in the Docker environment.
yarn downThis will run docker compose down to stop and remove all running containers.
yarn rebuildThis runs docker compose down, docker compose build, and docker compose up in sequence. Use this command to rebuild all Docker containers and restart them.
The repository is structured with a collection of microservices, each housed in its own folder. The automation scripts will handle installing, cleaning, and running these services.
project-root/
├── auth/
├── users/
├── payments/
├── profiles/
├── file-manager/
├── email-service/
├── groceries/
├── install_all.sh
├── cleanup.sh
├── docker-compose.yml
└── package.json