Skip to main content
Every SmartLogix service is configured entirely through environment variables. The values below are read at container startup; changing them requires restarting (or rebuilding) the affected container. Default values are defined in each service’s application.properties and are used when a variable is not set.
The JWT_SECRET value in docker-compose.yml (bXlTZWN1cmVTZWNyZXRLZXkxMjM0NTY3ODkwQUJDREU=) is a public placeholder committed to the repository. It must be replaced with a privately generated secret before deploying to any environment accessible over a network. Anyone who knows this value can forge valid tokens.

Shared secret

JWT_SECRET is the only variable that must be identical across two services. If the values diverge, the gateway will reject every token issued by the auth-service.
VariableServicesRequiredDescription
JWT_SECRETapi-gateway, auth-serviceYesBase64-encoded HMAC-SHA key used to sign and verify JWTs. Must be the same value in both services.
Generate a secure value:
openssl rand -base64 32
Set it in the environment before running docker compose up:
export JWT_SECRET=$(openssl rand -base64 32)
Or add it to a .env file in the project root (Docker Compose loads .env automatically):
JWT_SECRET=<your-generated-value>

API gateway (api-gateway)

VariableRequiredDefaultDescription
JWT_SECRETYesbXlTZWN1cmVTZWNyZXRLZXkxMjM0NTY3ODkwQUJDREU=Shared HMAC-SHA key for JWT verification. See Shared secret.
The gateway exposes Actuator at /actuator/health and /actuator/info. No database connection is required.

Auth service (auth-service)

VariableRequiredDefaultDescription
JWT_SECRETYes(none)Shared HMAC-SHA key for JWT signing. Must match the gateway.
DB_HOSTYeslocalhostHostname of the PostgreSQL instance (postgres-auth in Docker).
DB_NAMEYesauth_dbDatabase name.
DB_USERYespostgresDatabase username.
DB_PASSYessecretDatabase password.
Additional properties (configured in application.properties, not overridable via env by default):
PropertyValueDescription
jwt.expiration86400000Token lifetime in milliseconds (24 hours).
jwt.expiration is a Spring property key, not an environment variable. To change it you must edit auth-service/src/main/resources/application.properties and rebuild the image.

Inventory service (ms-inventario)

VariableRequiredDefaultDescription
DB_HOSTYeslocalhostHostname of the PostgreSQL instance (postgres-inventario in Docker).
DB_NAMEYesinventario_dbDatabase name.
DB_USERYespostgresDatabase username.
DB_PASSYessecretDatabase password.

Orders service (ms-pedidos)

VariableRequiredDefaultDescription
DB_HOSTYeslocalhostHostname of the PostgreSQL instance (postgres-pedidos in Docker).
DB_NAMEYespedidos_dbDatabase name.
DB_USERYespostgresDatabase username.
DB_PASSYessecretDatabase password.
The orders service also connects to ms-inventario via the hardcoded property inventario.service.url=http://ms-inventario:8082. This value relies on Docker Compose service name resolution and does not need to change in a standard Docker deployment.

Shipping service (ms-envios)

VariableRequiredDefaultDescription
DB_HOSTYeslocalhostHostname of the PostgreSQL instance (postgres-envios in Docker).
DB_NAMEYesenvios_dbDatabase name.
DB_USERYespostgresDatabase username.
DB_PASSYessecretDatabase password.

Notification service (notification-service)

The notification service has no environment variables defined in docker-compose.yml. It starts with the defaults embedded in its application configuration.

Frontend (frontend)

VariableRequiredDefaultDescription
VITE_API_URLNohttp://localhost:8080/apiBase URL for all API requests from the React app. Must be reachable from the user’s browser, not from inside the Docker network.
VITE_API_URL is a Vite build-time variable. It is baked into the compiled JavaScript bundle at npm run build time. Changing it after the image is built has no effect — you must set the variable and rebuild the image with docker compose up -d --build frontend.
For a production deployment behind a load balancer or reverse proxy, set VITE_API_URL to your public API gateway URL:
# .env
VITE_API_URL=https://api.smartlogix.example.com/api

Docker Compose defaults at a glance

The table below summarises every value docker-compose.yml sets explicitly. All other values fall back to the per-service application.properties defaults shown in the sections above.
ServiceVariableValue in docker-compose.yml
api-gatewayJWT_SECRETbXlTZWN1cmVTZWNyZXRLZXkxMjM0NTY3ODkwQUJDREU=
auth-serviceJWT_SECRETbXlTZWN1cmVTZWNyZXRLZXkxMjM0NTY3ODkwQUJDREU=
auth-serviceDB_HOSTpostgres-auth
auth-serviceDB_NAMEauth_db
auth-serviceDB_USERpostgres
auth-serviceDB_PASSsecret
ms-inventarioDB_HOSTpostgres-inventario
ms-inventarioDB_NAMEinventario_db
ms-inventarioDB_USERpostgres
ms-inventarioDB_PASSsecret
ms-pedidosDB_HOSTpostgres-pedidos
ms-pedidosDB_NAMEpedidos_db
ms-pedidosDB_USERpostgres
ms-pedidosDB_PASSsecret
ms-enviosDB_HOSTpostgres-envios
ms-enviosDB_NAMEenvios_db
ms-enviosDB_USERpostgres
ms-enviosDB_PASSsecret