Overview
GB App uses Laravel’s environment configuration system via the.env file. All configuration options are defined in .env.example and should be copied to .env for your environment.
Creating Your Environment File
.env, always clear the configuration cache:
Application Settings
Basic Configuration
.env.example
- APP_NAME: Application display name (shown in UI and emails)
- APP_ENV: Environment (
local,staging,production) - APP_KEY: Encryption key (generate with
php artisan key:generate) - APP_DEBUG: Enable/disable debug mode (set to
falsein production) - APP_URL: Base URL of your application
Logging
.env.example
- LOG_CHANNEL: Logging channel (
stack,single,daily,stderr) - LOG_DEPRECATIONS_CHANNEL: Channel for deprecation warnings
- LOG_LEVEL: Minimum log level (
debug,info,notice,warning,error,critical,alert,emergency)
Production Logging
For production, use:Database Configuration
Primary Database (MySQL)
.env.example
- DB_CONNECTION: Database driver (
mysql,sqlsrv) - DB_HOST: Database server hostname (use
dbfor Docker container) - DB_PORT: Database port (3306 for MySQL, 1433 for SQL Server)
- DB_DATABASE: Database name
- DB_USERNAME: Database user
- DB_PASSWORD: Database password
When using the Docker setup,
DB_HOST=db references the database container defined in docker-compose.yml.Secondary Database (SQL Server - Optional)
GB App supports additional SQL Server connections:.env.example
Broadcasting, Cache, and Queue
.env.example
Session Configuration
- SESSION_DRIVER: Where to store sessions (
file,database,redis) - SESSION_LIFETIME: Session lifetime in minutes (120 = 2 hours)
GB App uses
database for session storage to enable better session management and tracking.Cache Configuration
- CACHE_DRIVER: Cache backend (
file,redis,memcached,array)
Queue Configuration
- QUEUE_CONNECTION: Queue backend (
sync,database,redis,sqs)
Mail Configuration
.env.example
Development Mail (Mailpit)
The default configuration uses Mailpit for development (catches all emails).Production Mail (SMTP)
For production, configure your SMTP server:Redis Configuration
.env.example
- Caching in production
- Session storage with multiple servers
- Queue backend
- Broadcasting
Memcached
.env.example
AWS Configuration
If using AWS services (S3, SES, etc.):.env.example
Pusher (Real-time Broadcasting)
.env.example
Power BI Configuration
.env.example
LDAP Configuration
.env.example
Environment-Specific Configuration
Local Development
Staging
Production
Configuration Files
Environment variables map to configuration files inconfig/:
config/app.php- Application settingsconfig/database.php- Database connectionsconfig/mail.php- Mail configurationconfig/cache.php- Cache settingsconfig/session.php- Session configurationconfig/power-bi.php- Power BI API settingsconfig/ldap.php- LDAP configuration
Clearing Configuration Cache
After modifying.env, always clear the cache:
config:clear- Clear configuration cacheroute:clear- Clear route cacheview:clear- Clear view cacheconfig:cache- Cache configurationroute:cache- Cache routes
Security Best Practices
Use Strong Passwords
Use strong, unique passwords for:
- Database users
- LDAP bind accounts
- Power BI service accounts
- Email accounts