Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Nelsoncg98/InnovaTech/llms.txt

Use this file to discover all available pages before exploring further.

Before you can run any InnovaTech SOA microservice locally, the shared infrastructure layer must be running. The project ships a docker-compose.yml at the repository root that provisions both database engines — PostgreSQL 15 for transactional services and MongoDB 6.0 for the product catalog — on an isolated bridge network. This is the only step that requires Docker; the microservices themselves run directly on the host via Maven.

Overview

The Compose file defines two services, one custom bridge network, and two named volumes:
ResourceTypePurpose
postgres-dbServiceRelational database for inventory, customers, and POS sales
mongo-dbServiceDocument database for the product catalog
soa-networkNetwork (bridge)Isolated network connecting both database containers
postgres_dataNamed volumePersists PostgreSQL data across container restarts
mongo_dataNamed volumePersists MongoDB data across container restarts
Both containers join the soa-network bridge network. Although the microservices connect to the databases via localhost during local development, the shared network ensures that any future containerised service can reach the databases by container name without needing host-mode networking.

Services

postgres-db — PostgreSQL 15

The relational database is used by servicio-inventario and is planned as the backing store for servicio-clientes and servicio-ventapos. It runs on the lightweight Alpine variant of the official PostgreSQL 15 image.
PropertyValue
Imagepostgres:15-alpine
Container nameinnovatech-postgres
POSTGRES_USERinnovatech
POSTGRES_PASSWORDsecretpassword
POSTGRES_DBinnovatech_db
Host port → Container port5433 → 5432
Named volumepostgres_data:/var/lib/postgresql/data

mongo-db — MongoDB 6.0

The document store backs the servicio-catalogo service and holds the product and pricing catalogue. The root admin credentials set here must match the URI used in servicio-catalogo’s application.yml.
PropertyValue
Imagemongo:6.0
Container nameinnovatech-mongo
MONGO_INITDB_ROOT_USERNAMEadmin
MONGO_INITDB_ROOT_PASSWORDsecretpassword
Host port → Container port27017 → 27017
Named volumemongo_data:/data/db

Full docker-compose.yml

The complete file as it appears in the repository root:
version: '3.8'

services:
  # Base de Datos Relacional (PostgreSQL) para Clientes, Inventario y Ventas
  postgres-db:
    image: postgres:15-alpine
    container_name: innovatech-postgres
    environment:
      POSTGRES_USER: innovatech
      POSTGRES_PASSWORD: secretpassword
      POSTGRES_DB: innovatech_db
    ports:
      - "5433:5432"
    volumes:
      - postgres_data:/var/lib/postgresql/data
    networks:
      - soa-network

  # Base de Datos No Relacional (MongoDB) para el Catálogo Web (Requisito de Rúbrica)
  mongo-db:
    image: mongo:6.0
    container_name: innovatech-mongo
    environment:
      MONGO_INITDB_ROOT_USERNAME: admin
      MONGO_INITDB_ROOT_PASSWORD: secretpassword
    ports:
      - "27017:27017"
    volumes:
      - mongo_data:/data/db
    networks:
      - soa-network

networks:
  soa-network:
    driver: bridge

volumes:
  postgres_data:
  mongo_data:

Commands

Use the following commands from the repository root (where docker-compose.yml lives):
1

Start all infrastructure services in the background

docker-compose up -d
Docker pulls the images on first run (requires an internet connection). Subsequent starts use the local cache.
2

Verify both containers are running

docker-compose ps
Both innovatech-postgres and innovatech-mongo should show a running state before you start any microservice.
3

Stop containers (data is preserved)

docker-compose down
Named volumes (postgres_data, mongo_data) are retained — your data survives the shutdown.
4

Stop containers and erase all data

docker-compose down -v
The -v flag removes the named volumes as well. Use this to reset the environment to a clean slate.

Port Mappings

ServiceContainer PortHost PortPurpose
PostgreSQL54325433Relational DB (inventory, customers, POS)
MongoDB2701727017Document DB (product catalog)
PostgreSQL is deliberately mapped to host port 5433 (not the default 5432) to avoid conflicts with any locally installed PostgreSQL instance. All microservices and client tools must therefore use port 5433 in their connection strings. For example, the JDBC URL used by servicio-inventario is:
jdbc:postgresql://localhost:5433/innovatech_db
Using port 5432 in a connection string will fail unless you have a separate local PostgreSQL server running.

Build docs developers (and LLMs) love