Skip to content

Environment configuration

Marketix is configured entirely through environment variables. Start by copying .env.example to .env, then work through the groups below. Variables used only in Docker Compose deployments are read from .env by Docker and passed into the containers — they are not loaded from the filesystem inside the container.

For a complete, searchable table of every variable, see Environment variables reference.

APP_NAME=Laravel
APP_ENV=production
APP_KEY=
APP_DEBUG=false
APP_URL=https://app.example.com
APP_DOMAIN=app.example.com
APP_LOCALE=en
APP_FALLBACK_LOCALE=en
VariableDescription
APP_NAMEDisplay name of the application. Passed to the frontend as VITE_APP_NAME. Used in email subjects and branding.
APP_ENVSet to production on live deployments. Controls debug output and error handling.
APP_KEY32-byte application encryption key. Generate with php artisan key:generate. Required and must be kept secret.
APP_DEBUGSet to false in production. true exposes stack traces in error responses.
APP_URLFull URL of the application including scheme (e.g. https://app.example.com). Used to generate absolute URLs in emails and redirects.
APP_DOMAINHostname only, without scheme (e.g. app.example.com). Used by the route group for the main application and by Traefik’s Host() rule. Must match your DNS A record.
APP_LOCALEDefault locale for the application UI (e.g. en, de).
APP_FALLBACK_LOCALEFallback locale when a translation key is missing.
DB_CONNECTION=mariadb
DB_HOST=db
DB_PORT=3306
DB_DATABASE=db
DB_USERNAME=db
DB_PASSWORD=db
VariableDescription
DB_CONNECTIONDriver: mariadb for production (Docker Compose default), sqlite for local development.
DB_HOSTDatabase server hostname. Use db when running inside the provided Compose stack.
DB_PORTDatabase port. Default MariaDB port is 3306.
DB_DATABASEDatabase name.
DB_USERNAMEDatabase user.
DB_PASSWORDDatabase password.
SESSION_DRIVER=database
SESSION_LIFETIME=120
CACHE_STORE=database
QUEUE_CONNECTION=redis
VariableDescription
SESSION_DRIVERWhere sessions are stored. database is the default. Can be changed to redis for better performance.
SESSION_LIFETIMESession lifetime in minutes.
CACHE_STORECache backend. database by default. Change to redis for production under load.
QUEUE_CONNECTIONQueue backend. Must be redis for Horizon to work. The default in .env.example is database; the Docker Compose stack overrides this to redis.
REDIS_CLIENT=phpredis
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
VariableDescription
REDIS_CLIENTPHP Redis client library. phpredis (C extension) is the default and is installed in the Docker image.
REDIS_HOSTRedis server hostname. Use redis inside the Docker Compose stack.
REDIS_PASSWORDRedis authentication password. Set to a strong value in production. Must match REDIS_PASSWORD in the Docker Compose credentials section.
REDIS_PORTRedis port. Default is 6379.
MAIL_MAILER=smtp
MAIL_HOST=smtp.example.com
MAIL_PORT=587
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_FROM_ADDRESS="hello@example.com"
MAIL_FROM_NAME="${APP_NAME}"
VariableDescription
MAIL_MAILERTransport driver. Use smtp for standard SMTP, log for development (writes to log file).
MAIL_HOSTSMTP server address.
MAIL_PORTSMTP port (typically 587 for STARTTLS or 465 for SSL).
MAIL_USERNAMESMTP username.
MAIL_PASSWORDSMTP password.
MAIL_FROM_ADDRESSEnvelope sender address. Must be a valid address accepted by your SMTP provider.
MAIL_FROM_NAMESender display name shown in mail clients.

Mail is required for team invitations and password reset emails.

FILESYSTEM_DISK=local
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false
VariableDescription
FILESYSTEM_DISKlocal stores files in storage/app. s3 uses the S3-compatible provider configured below.
AWS_ACCESS_KEY_IDS3 access key.
AWS_SECRET_ACCESS_KEYS3 secret key.
AWS_DEFAULT_REGIONBucket region.
AWS_BUCKETBucket name.
AWS_USE_PATH_STYLE_ENDPOINTSet true for MinIO and other path-style-endpoint providers.
OCTANE_SERVER=frankenphp

The official Docker image is built with FrankenPHP. This variable must stay frankenphp when using the provided Dockerfile and Compose stack. The Compose file sets this value and ignores whatever is in the host .env — only relevant if you run Octane outside Docker.

VITE_APP_NAME="${APP_NAME}"

VITE_APP_NAME is embedded into the compiled frontend bundle at build time. In the Docker image it is set to marketix. If you build your own image, override this variable before running npm run build.

These variables are read by docker-compose.yml on the host (not inside containers) for service bootstrapping.

LETSENCRYPT_EMAIL=admin@example.com
MYSQL_ROOT_PASSWORD=change-me-strong-password
REDIS_PASSWORD=change-me-strong-password
TRAEFIK_DYNAMIC_FILE=/traefik/custom-domains.yml
TRAEFIK_APP_URL=http://app:8000
VariableDescription
LETSENCRYPT_EMAILEmail address passed to the Let’s Encrypt ACME server when registering the TLS account. Required for Traefik to obtain certificates.
MYSQL_ROOT_PASSWORDMariaDB root password. Set a strong, unique value — this is the superuser credential for the database service.
REDIS_PASSWORDPassword passed to both the Redis redis-server --requirepass command and the application’s REDIS_PASSWORD. Must be identical in both places.
TRAEFIK_DYNAMIC_FILEPath inside the container where the app writes the Traefik file-provider YAML. Default is /traefik/custom-domains.yml — do not change unless you also modify the Compose volume mounts.
TRAEFIK_APP_URLInternal URL of the app container as seen by Traefik. Default is http://app:8000. Do not change unless you rename the service.