Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Miguel-Rodriguez15/msvc/llms.txt

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

Each microservice is configured through environment variables injected at runtime. This page documents every variable, its default value (sourced directly from each service’s application.properties and configmap.yaml), and where it is used.
In Kubernetes, variables are injected via a ConfigMap (e.g., msvc-usuarios, msvc-cursos) and a Secret (e.g., msvc-usuarios, msvc-cursos). In Docker Compose, use .env files referenced by the env_file key in docker-compose.yml.

msvc-auth (port 9000)

msvc-auth has no database. Its application.properties sets only the application name and a hardcoded port of 9000. No environment variables are declared in its application.properties — the port is not overridable via a PORT variable.

msvc-usuarios (port 8001)

MySQL-backed user service and OAuth2 resource server. In Kubernetes, non-sensitive variables are read from the msvc-usuarios ConfigMap and sensitive credentials from the msvc-usuarios Secret.
VariableDescriptionDefault
PORTHTTP server listen port8001
DB_HOTMySQL host and port used in the JDBC URLmysql8:3306
DB_DATABASEMySQL database (schema) namemsvc_usuarios
DB_USERNAMEMySQL login userroot
DB_PASSWORDMySQL login passwordadmin123
CURSOS_URLBase host:port of msvc-cursos used by the OpenFeign clientmsvc-cursos:8002
LB_AUTH_ISSUER_URIOAuth2 issuer URI for JWT validation; set in the msvc-usuarios ConfigMaphttp://192.168.49.2:30794
LB_AUTH_REDIRECT_URIOAuth2 redirect URI; set in the msvc-usuarios ConfigMaphttp://192.168.49.2:31415
LB_USUARIOS_URIBase URL of msvc-usuarios; set in the msvc-usuarios ConfigMaphttp://192.168.49.2:31415

ConfigMap: msvc-usuarios-config

msvc-usuarios also reads from a dedicated Spring Cloud Kubernetes ConfigMap named msvc-usuarios-config. This ConfigMap injects profile-specific config.texto values via spring.cloud.kubernetes.config.name=msvc-usuarios-config:
apiVersion: v1
kind: ConfigMap
metadata:
  name: msvc-usuarios-config
data:
  application.yaml: |
    config:
      texto: "configuracion ambiente por defecto"
    ---
    spring:
      config:
        activate:
          on-profile: dev
    config:
      texto: "configuracion ambiente de desarrollo"
    ---
    spring:
      config:
        activate:
          on-profile: prod
    config:
      texto: "configuracion ambiente de produccion"

msvc-cursos (port 8002)

PostgreSQL-backed courses service. Non-sensitive variables come from the msvc-cursos ConfigMap and database credentials from the msvc-cursos Secret.
VariableDescriptionDefault
PORTHTTP server listen port8002
DB_HOSTPostgreSQL host and port used in the JDBC URLpostgres-cursos:5432
DB_DATABASEPostgreSQL database namemsvc_cursos
DB_USERNAMEPostgreSQL login userpostgres
DB_PASSWORDPostgreSQL login passwordpostgres123
USUARIOS_URLBase host:port of msvc-usuarios used by the OpenFeign clientmsvc-usuarios:8001

msvc-gateway (port 8090)

msvc-gateway has no database and requires no credentials. It relies entirely on Spring Cloud Kubernetes service discovery to resolve lb://msvc-usuarios and lb://msvc-cursos URIs at runtime. Its application.properties declares only the application name and a hardcoded port of 8090. No environment variables are defined — the port is not overridable via a PORT variable.

Kubernetes ConfigMaps and Secrets

ConfigMap structure

Two ConfigMaps — msvc-usuarios and msvc-cursos — hold all non-sensitive variables. They are created from configmap.yaml before the microservice Deployments are applied:
# configmap.yaml (msvc-usuarios entries)
apiVersion: v1
kind: ConfigMap
metadata:
  name: msvc-usuarios
data:
  PORT: "8001"
  DB_HOT: "mysql8:3306"
  DB_DATABASE: "msvc_usuarios"
  CURSOS_URL: "msvc-cursos:8002"
  LB_AUTH_ISSUER_URI: "http://192.168.49.2:30794"
  LB_AUTH_REDIRECT_URI: "http://192.168.49.2:31415"
  LB_USUARIOS_URI: "http://192.168.49.2:31415"
# configmap.yaml (msvc-cursos entries)
apiVersion: v1
kind: ConfigMap
metadata:
  name: msvc-cursos
data:
  PORT: "8002"
  DB_HOST: "postgres14:5432"
  DB_DATABASE: "msvc_cursos"
  USUARIOS_URL: "msvc-usuarios:8001"

Secret structure

Database credentials are stored as Base64-encoded Opaque Secrets in secret.yaml and mounted into deployments via secretKeyRef:
# secret.yaml
apiVersion: v1
kind: Secret
metadata:
  name: msvc-usuarios
type: Opaque
data:
  DB_USERNAME: cm9vdA==       # root
  DB_PASSWORD: YWRtaW4xMjM=   # admin123
---
apiVersion: v1
kind: Secret
metadata:
  name: msvc-cursos
type: Opaque
data:
  DB_USERNAME: cG9zdGdyZXM=   # postgres
  DB_PASSWORD: YWRtaW4xMjM=   # admin123
Apply the ConfigMap and Secret before deploying any microservice:
kubectl apply -f configmap.yaml
kubectl apply -f secret.yaml
The default credentials (admin123, postgres123) are for local development only. You must override all passwords in production via Kubernetes Secrets. Never commit plaintext credentials to your repository. See Kubernetes Manifests for the full production deployment guide.

Build docs developers (and LLMs) love