Docker is the containerization backbone of InventarioITU. Every service in the stack — the Node.js web frontend, the relational database for location and assignment data, the MongoDB database for hardware component records, and the OpenLDAP authentication server — runs as an isolated container. This approach ensures consistent behavior across development machines and production infrastructure, eliminates dependency conflicts, and makes the entire system reproducible with a single command.Documentation 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.
Services Overview
InventarioITU is composed of four containers, each with a distinct responsibility:inventario-web
The Node.js + Express web application. Serves the inventory UI on port 3000 and connects outward to all three backend services.
ubicacion-db
A relational database instance (SQL Server 2022 or MySQL, depending on your chosen setup) on port 1433. Stores data about lab locations and equipment assignments.
inventario-db
A MongoDB 7 instance on port 27017. Stores flexible hardware component documents for each inventoried machine.
ldap-service
An OpenLDAP server on port 389. Provides centralized authentication for ITU Mendoza staff accessing the system.
Dockerfile for the Web Application
Theinventario-web image is built from the app/ directory at the root of the repository. It uses the lightweight node:18-alpine base image to keep the final image size small and the attack surface minimal. Production dependencies are installed with npm ci --only=production to guarantee a reproducible install from the lockfile.
Save a Dockerfile like this as app/Dockerfile in your project:
COPY package*.json ./ layer is intentionally separated from COPY . . so that Docker can cache the dependency installation step and avoid re-running npm ci on every source code change.
docker-compose.yml
For local development, adocker-compose.yml file brings up the complete four-service stack in a single step. All services join a dedicated bridge network (inventario-net) so they can reach each other by service name — the web app connects to ubicacion-db, inventario-db, and ldap-service directly without needing IP addresses.
Save a compose file like this as docker-compose.yml in your project root:
The
ubicacion-db service below shows the SQL Server image. If your setup uses MySQL instead, replace the image, environment, and ports block for ubicacion-db with the appropriate MySQL image (e.g., mysql:8) and its environment variables. Both options expose the same port 1433 internally for consistency with the rest of the stack configuration.depends_on block on inventario-web ensures Docker starts the three backend containers before the web process, though it does not wait for the services inside them to be fully ready. If the relational database or MongoDB takes a few seconds to initialize, the web app should implement retry logic on its database connection.
Building and Running
Build the web image
From the repository root, build theinventario-web image explicitly before composing:
Start the full stack
--build flag ensures the web image is rebuilt from the current source even if a cached layer exists. On first run, Docker pulls the SQL Server, MongoDB, and OpenLDAP images from their respective registries.
Run in the background
Tail logs for a specific service
Stop and remove containers
-v flag: