MongoDB stores the detailed hardware component data for every computer in InventarioITU’s inventory. Unlike lab room assignments — which have a fixed, predictable structure — hardware configurations vary significantly from machine to machine: one PC may have two storage drives and 16 GB of RAM, while another has a single SSD and 4 GB. A document database maps naturally onto this variability, allowing each equipment record to carry exactly the fields it needs without requiring nullable columns or separate lookup tables. The service is namedDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/carlamndz/InventarioITU/llms.txt
Use this file to discover all available pages before exploring further.
inventario-db throughout the stack and exposes the standard MongoDB port 27017.
The inventario-db Service
inventario-db is a MongoDB 7 instance dedicated to hardware component documents. One document per physical machine is stored in the componentes collection, keyed by the same equipment ID used in SQL Server. It is deployed as a Docker container for local development and as a Kubernetes Deployment + Service in the production cluster.
| Property | Value |
|---|---|
| Service name | inventario-db |
| Image | mongo:7 |
| Port | 27017 |
| Default database | inventario |
| Default admin user | admin |
Initialization scripts and seed JSON documents belong in
db/mongodb/ inside the repository. That directory currently contains placeholder files — when you add your init scripts or seed data there, reference them from this guide to streamline environment bootstrapping.Run MongoDB Locally with Docker
Startinventario-db locally with the following command. It creates an admin user using the provided environment variables and binds port 27017 on the host.
{ ok: 1 } confirms the server is ready.
Connection String
Use the following URI format to connect the application toinventario-db. When running inside the Kubernetes cluster, replace localhost with the service DNS name inventario-db.
authSource=admin parameter tells the driver to authenticate against the admin database where the root user was created during initialization.
Collection Initialization
Create the collection and insert the first document
Switch to the The
inventario database, create the componentes collection, and insert an example equipment document:_id value (LAB01-PC-001) matches the primary key in the SQL Server equipos table, enabling the application layer to join location data with hardware data for the same machine.Environment Variables
Configure the following variables in.env for local development or in a Kubernetes Secret for cluster deployments.
| Variable | Description | Example |
|---|---|---|
MONGO_URI | Full MongoDB connection URI | mongodb://admin:YourPassword@inventario-db:27017/inventario?authSource=admin |
MONGO_DB_NAME | Name of the application database within MongoDB | inventario |