This Service enables the creation and management of various entities and entityType .It provides functionalities for entities, ensuring seamless integration and maintenance of entity-related data across the platform.
- Operating System: Ubuntu 22
- Node.js: v20
- mongoDb: v4
Elevate entity-management services can be setup in local using two methods:
Dockerized service with local dependencies(Intermediate)
Expectation: Run single docker containerized service with existing local (in host) or remote dependencies.
-
Download Docker Compose File: Retrieve the docker-compose.yml file from the entity-management service repository and save it to the entity-management directory.
-
Run the docker container.
-
For Mac & Windows with docker v18.03+:
$ docker run --name entity-management shikshalokamqa/elevate-entity-management:1.0.0
-
For Linux:
$ docker run --name entity-management --add-host=host.docker.internal:host-gateway shikshalokamqa/elevate-entity-management:1.0.0`
Refer this for more information.
-
-
Run the docker container.
$ docker run --name entity-management shikshalokamqa/elevate-entity-management:1.0.0
Local Service with local dependencies(Hardest)
Expectation: Run single service with existing local dependencies in host (Non-Docker Implementation).
Refer to the NodeSource distributions installation scripts for Node.js installation.
$ curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - &&\
sudo apt-get install -y nodejs
Refer to How To Set Up a Node.js Application for Production on Ubuntu 22.04.
Run the following command
$ sudo npm install pm2@latest -g
opt/backend$ git clone -b develop-2.5 --single-branch "https://github.com/ELEVATE-Project/entity-management"
backend/entity-management/src$ sudo npm i
entity-management/src$ sudo nano .env
Copy-paste the following env variables to the .env
file:
# entity-management Service Config
# Port on which service runs
APPLICATION_PORT=5001
# Application environment
APPLICATION_ENV=development
# Route after the base URL
APPLICATION_BASE_URL=/entity/
# Api doc URL
API_DOC_URL= "https://project-dev.elevate-apis.shikshalokam.org/entity-management/api-doc"
#User service URL
USER_SERVICE_URL = http://localhost:3001/user
INTERNAL_ACCESS_TOKEN="internal_access_token"
#DB URL
MONGODB_URL=mongodb://mongo:27017/elevate-entity-management
#service name
SERVICE_NAME = elevate-entity-service
version=8
Save and exit.
Start MongoDB Service
sudo systemctl start mongod
Verify MongoDB is running
sudo systemctl status mongod
Navigate to the src folder of entity-management service and run pm2 start command:
entity-management/src$ pm2 start app.js -i 2 --name elevate-entity-management
$ pm2 ls
This project was built to be used with Project Service and User Service.
The frontend/mobile application repo.
You can learn more about the full implementation of project-service here .
Several open source dependencies that have aided Mentoring's development: