Docker deployment
The recommended way to run Inventorix in production is the official noixdev/inventorix Docker image. It bundles PHP 8.4 on FrankenPHP, all required PHP extensions, pre-compiled frontend assets, and a startup entrypoint that handles database readiness, migrations, and cache warming automatically.
Quickstart
Section titled “Quickstart”The following command starts a single container connected to an existing MySQL instance. Replace the placeholder values with your own.
docker run -d \ -p 8000:8000 \ -e APP_KEY=base64:$(openssl rand -base64 32) \ -e APP_ENV=production \ -e APP_DEBUG=false \ -e DB_CONNECTION=mysql \ -e DB_HOST=... \ -e DB_DATABASE=inventorix \ -e DB_USERNAME=... \ -e DB_PASSWORD=... \ -e RUN_MIGRATIONS=true \ noixdev/inventorix:latestThe panel is available at http://<host>:8000 once the container reports healthy.
Production docker-compose example
Section titled “Production docker-compose example”For a complete deployment including the database and Redis, use a compose file. The example below wires up the application, MySQL, and Redis with the environment variables the app expects.
services: app: image: noixdev/inventorix:latest restart: unless-stopped ports: - "8000:8000" environment: APP_NAME: Inventorix APP_ENV: production APP_DEBUG: "false" APP_KEY: "base64:REPLACE_ME" APP_URL: "https://inventorix.example.com" LOG_LEVEL: warning SESSION_ENCRYPT: "true" SESSION_DOMAIN: "inventorix.example.com" DB_CONNECTION: mysql DB_HOST: db DB_PORT: "3306" DB_DATABASE: inventorix DB_USERNAME: inventorix DB_PASSWORD: "REPLACE_ME" REDIS_HOST: redis REDIS_PORT: "6379" QUEUE_CONNECTION: redis CACHE_STORE: redis SESSION_DRIVER: redis FILESYSTEM_DISK: local MAIL_MAILER: smtp MAIL_HOST: "REPLACE_ME" MAIL_PORT: "587" MAIL_USERNAME: "REPLACE_ME" MAIL_PASSWORD: "REPLACE_ME" MAIL_FROM_ADDRESS: "inventorix@example.com" MAIL_FROM_NAME: Inventorix RUN_MIGRATIONS: "true" depends_on: db: condition: service_healthy redis: condition: service_healthy healthcheck: test: ["CMD", "curl", "-fsS", "http://127.0.0.1:8000/up"] interval: 30s timeout: 5s start_period: 20s retries: 3
db: image: mysql:8.4 restart: unless-stopped environment: MYSQL_DATABASE: inventorix MYSQL_USER: inventorix MYSQL_PASSWORD: "REPLACE_ME" MYSQL_ROOT_PASSWORD: "REPLACE_ME_ROOT" volumes: - db_data:/var/lib/mysql healthcheck: test: ["CMD", "mysqladmin", "ping", "-h", "localhost"] interval: 10s timeout: 5s retries: 10
redis: image: redis:7-alpine restart: unless-stopped healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 10s timeout: 5s retries: 5
volumes: db_data:Entrypoint behaviour
Section titled “Entrypoint behaviour”When the container starts, the entrypoint script (docker/entrypoint.sh) runs the following steps before handing off to the Octane server:
-
Creates required storage directories —
storage/framework/cache,storage/framework/sessions,storage/framework/views,storage/logs,bootstrap/cache, and others. The container runs aswww-dataand these directories are owned accordingly. -
Waits for the database — if
DB_HOSTis set, the entrypoint polls the MySQL port every two seconds for up to 120 seconds (60 attempts). It aborts if the database never becomes reachable. -
Discovers packages and upgrades Filament — runs
php artisan package:discover --ansito register any newly added package service providers, thenphp artisan filament:upgrade --ansito apply pending Filament upgrade steps. -
Warms caches — runs
php artisan config:cache,php artisan event:cache, andphp artisan view:cache. Route caching is intentionally skipped because the application uses route macros with closures. -
Publishes assets — runs
php artisan filament:assetsand publishes Livewire assets. -
Runs migrations — if
RUN_MIGRATIONS=true(the default), runsphp artisan migrate --force. -
Starts Octane — the default
CMDis:Terminal window php artisan octane:start --server=frankenphp --host=0.0.0.0 --port=8000
The container exposes port 8000 and the Docker healthcheck polls http://127.0.0.1:8000/up.
Horizon (queue worker)
Section titled “Horizon (queue worker)”Horizon is not started by the entrypoint. In the single-container quickstart, you can start Horizon as a separate container or process. For production, run a second container with the same image and override the command:
docker run -d \ --env-file .env.production \ noixdev/inventorix:latest \ php artisan horizonEnsure the second container has the same environment variables as the app container, particularly REDIS_HOST, QUEUE_CONNECTION=redis, and all DB_* values. The Horizon dashboard is available at /horizon on the app container.
Image tags
Section titled “Image tags”| Tag | Description |
|---|---|
latest | Most recent stable release |
x.y.z | Pinned semantic version release |
Pin to a specific version tag in production to control upgrade timing.