Skip to content

Environment configuration

Inventorix is configured entirely through environment variables. This page walks through the groups you must set for a production deployment. A complete variable listing is available in the Reference section at /inventorix/reference/environment-variables/.

VariableDefaultProduction value
APP_NAMEInventorixYour instance name
APP_ENVlocalproduction
APP_DEBUGtruefalse — never expose debug output in production
APP_KEY(empty)A generated 32-byte base64 key (see below)
APP_URLhttp://localhostYour public URL, e.g. https://inventorix.example.com
APP_LOCALEdePrimary locale
APP_FALLBACK_LOCALEenFallback locale
LOG_LEVELdebugwarning or error in production
SESSION_ENCRYPTfalsetrue in production
SESSION_DOMAINnullYour hostname, e.g. inventorix.example.com

Run this once before first boot and store the result securely:

Terminal window
php artisan key:generate --show

Or generate inline when running Docker:

Terminal window
base64:$(openssl rand -base64 32)
VariableDefaultNotes
DB_CONNECTIONsqliteSet to mysql or mariadb for production
DB_HOST127.0.0.1Hostname of your MySQL/MariaDB server
DB_PORT3306MySQL port
DB_DATABASElaravelDatabase name
DB_USERNAMErootDatabase user
DB_PASSWORDDatabase password

The entrypoint waits for the database to be reachable on DB_HOST:DB_PORT before running migrations or starting the server. If DB_HOST is not set, the wait is skipped (useful for local SQLite development).

VariableDefaultNotes
REDIS_CLIENTphpredisphpredis or predis
REDIS_HOST127.0.0.1Redis hostname
REDIS_PORT6379Redis port
REDIS_PASSWORDnullSet if Redis requires authentication

Redis is used by Horizon (queue worker) and is recommended for cache and sessions in production (see below).

VariableDevelopment defaultRecommended production value
CACHE_STOREdatabaseredis
QUEUE_CONNECTIONdatabaseredis (required for Horizon)
SESSION_DRIVERdatabaseredis or database
SESSION_LIFETIME120Minutes before idle session expires
VariableDefaultNotes
FILESYSTEM_DISKlocalSet to s3 for object storage
AWS_ACCESS_KEY_IDAccess key
AWS_SECRET_ACCESS_KEYSecret key
AWS_DEFAULT_REGIONus-east-1Bucket region
AWS_BUCKETBucket name
AWS_ENDPOINTOverride for non-AWS providers (MinIO, Tigris, etc.)
AWS_USE_PATH_STYLE_ENDPOINTfalseSet true for MinIO and other path-style S3 services

The local disk stores files under storage/app/private inside the container. In a production Docker deployment with no persistent volume for storage, use FILESYSTEM_DISK=s3 to avoid data loss on container restarts.

VariableDefaultNotes
MAIL_MAILERlogSet to smtp, postmark, resend, or postal for production
MAIL_HOST127.0.0.1SMTP host
MAIL_PORT2525SMTP port
MAIL_USERNAMEnullSMTP username
MAIL_PASSWORDnullSMTP password
MAIL_FROM_ADDRESShello@example.comSender address
MAIL_FROM_NAME${APP_NAME}Sender name

Mail is used for warranty expiry digests and other system notifications. With MAIL_MAILER=log, emails are written to the application log instead of being delivered — suitable only for development.

VariableDefaultNotes
MS_LOGIN_ENABLEDfalseSet true to show the “Login via Entra ID” button
MS_CLIENT_IDAzure app registration client ID
MS_CLIENT_SECRETAzure app registration client secret
MS_TENANT_IDAzure tenant ID
MS_REDIRECT_URI${APP_URL}/auth/microsoft/callbackOAuth redirect URI; register this in Azure

When MS_LOGIN_ENABLED=false, the SSO button does not appear and the MS_* credential variables are not read. You can also toggle SSO on or off from the Auth Settings page in the panel without restarting the container (settings are stored in the database).

VariableDefaultNotes
RUN_MIGRATIONStrueSet false on multi-replica deployments; run migrations separately

When true, the entrypoint runs php artisan migrate --force on every container start before handing control to Octane. This is safe for single-replica deployments. For multi-replica deployments (Kubernetes, Docker Swarm), set this to false and run migrations as a one-shot job to prevent concurrent migration races.