InventarioITU uses a relational database as the backbone for structured, normalized data that describes where each piece of equipment lives and who it is assigned to. The project supports SQL Server (primary) or MySQL as the relational engine — both expose the same logical schema. Lab room definitions, equipment registration records, and assignment histories all fit naturally into a relational model: rows have predictable shapes, foreign keys enforce referential integrity between labs and machines, and SQL queries make it straightforward to produce audit reports. 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.
ubicacion-db throughout the stack and runs on port 1433 (SQL Server) or 3306 (MySQL).
The ubicacion-db Service
Within the InventarioITU architecture, ubicacion-db is a Microsoft SQL Server 2022 instance (or MySQL 8, depending on your chosen engine) responsible exclusively for location and assignment data. It is deployed as a Docker container during local development and as a Kubernetes Deployment + Service object in the production cluster.
| Property | SQL Server value | MySQL value |
|---|---|---|
| Service name | ubicacion-db | ubicacion-db |
| Image | mcr.microsoft.com/mssql/server:2022-latest | mysql:8 |
| Port | 1433 | 3306 |
| Default database | inventario | inventario |
| Default user | sa | root |
SQL initialization scripts and schema migration files belong in
db/sqlserver/ inside the repository. That directory currently contains placeholder files — when you add your SQL scripts there, reference them from this guide for easy bootstrapping.Run SQL Server Locally with Docker
For local development you can spin upubicacion-db with a single docker run command. This starts SQL Server 2022 in a detached container, accepts the EULA, and binds port 1433 on your host machine.
Connection String
The application connects toubicacion-db using the following connection string format. Replace the host with the Kubernetes service DNS name (ubicacion-db) when running inside the cluster.
ubicacion-db Service:
Schema Initialization
Connect to the SQL Server instance
Use
sqlcmd, Azure Data Studio, or the SQL Server extension for VS Code to open a session against the running container before executing the schema script.Create the database and tables
Run the following DDL to create the The
inventario database and its core tables. This is an illustrative example — you can place it in db/sqlserver/init.sql once you are ready to check scripts into the repository.equipos.id column (e.g. LAB01-PC-001) is a human-readable composite key that also acts as the cross-database link to MongoDB. See Data Model for details.Environment Variables
Theinventario-web application reads the following environment variables to build its SQL Server connection. Set them in your .env file for local development or in a Kubernetes Secret for cluster deployments.
| Variable | Description | Example |
|---|---|---|
DB_HOST | Hostname or IP of the SQL Server instance | ubicacion-db |
DB_PORT | TCP port SQL Server listens on | 1433 |
DB_NAME | Name of the application database | inventario |
DB_USER | SQL login username | sa |
DB_PASSWORD | Password for the SQL login | YourStrong!Passw0rd |