Skip to content

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.

The following command starts a single container connected to an existing MySQL instance. Replace the placeholder values with your own.

Terminal window
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:latest

The panel is available at http://<host>:8000 once the container reports healthy.

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:

When the container starts, the entrypoint script (docker/entrypoint.sh) runs the following steps before handing off to the Octane server:

  1. Creates required storage directoriesstorage/framework/cache, storage/framework/sessions, storage/framework/views, storage/logs, bootstrap/cache, and others. The container runs as www-data and these directories are owned accordingly.

  2. Waits for the database — if DB_HOST is 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.

  3. Discovers packages and upgrades Filament — runs php artisan package:discover --ansi to register any newly added package service providers, then php artisan filament:upgrade --ansi to apply pending Filament upgrade steps.

  4. Warms caches — runs php artisan config:cache, php artisan event:cache, and php artisan view:cache. Route caching is intentionally skipped because the application uses route macros with closures.

  5. Publishes assets — runs php artisan filament:assets and publishes Livewire assets.

  6. Runs migrations — if RUN_MIGRATIONS=true (the default), runs php artisan migrate --force.

  7. Starts Octane — the default CMD is:

    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 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:

Terminal window
docker run -d \
--env-file .env.production \
noixdev/inventorix:latest \
php artisan horizon

Ensure 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.

TagDescription
latestMost recent stable release
x.y.zPinned semantic version release

Pin to a specific version tag in production to control upgrade timing.