154 lines
4.7 KiB
Plaintext
154 lines
4.7 KiB
Plaintext
# Production Environment Configuration for Sibedas PBG Web
|
|
# Copy this file to .env and update the values
|
|
|
|
# =============================================================================
|
|
# REVERSE PROXY & SSL CONFIGURATION
|
|
# =============================================================================
|
|
|
|
# Domain configuration
|
|
DOMAIN=sibedas.yourdomain.com
|
|
EMAIL=admin@yourdomain.com
|
|
SSL_TYPE=self-signed # Options: self-signed, letsencrypt
|
|
|
|
# Nginx ports (usually 80 and 443)
|
|
NGINX_HTTP_PORT=80
|
|
NGINX_HTTPS_PORT=443
|
|
|
|
# =============================================================================
|
|
# LARAVEL APPLICATION CONFIGURATION
|
|
# =============================================================================
|
|
|
|
# Application settings
|
|
APP_NAME="Sibedas PBG Web"
|
|
APP_ENV=production
|
|
APP_DEBUG=false
|
|
APP_KEY=base64:your_app_key_here
|
|
APP_URL=https://sibedas.yourdomain.com
|
|
APP_TIMEZONE=Asia/Jakarta
|
|
|
|
# Vite configuration
|
|
VITE_APP_URL=https://sibedas.yourdomain.com
|
|
|
|
# =============================================================================
|
|
# DATABASE CONFIGURATION
|
|
# =============================================================================
|
|
|
|
# Database connection
|
|
DB_CONNECTION=mariadb
|
|
DB_HOST=db
|
|
DB_PORT=3306
|
|
DB_DATABASE=sibedas
|
|
DB_USERNAME=sibedas_user
|
|
DB_PASSWORD=your_secure_database_password
|
|
|
|
# MySQL root password
|
|
MYSQL_ROOT_PASSWORD=your_secure_root_password
|
|
|
|
# MySQL performance tuning
|
|
MYSQL_INNODB_BUFFER_POOL_SIZE=1G
|
|
|
|
# External database port (optional, for external access)
|
|
DB_EXTERNAL_PORT=3306
|
|
|
|
# =============================================================================
|
|
# CACHE, SESSION & QUEUE CONFIGURATION
|
|
# =============================================================================
|
|
|
|
# Cache configuration (using database)
|
|
CACHE_DRIVER=database
|
|
|
|
# Session configuration (using database)
|
|
SESSION_DRIVER=database
|
|
SESSION_LIFETIME=120
|
|
|
|
# Queue configuration (using database)
|
|
QUEUE_CONNECTION=database
|
|
|
|
# =============================================================================
|
|
# MAIL CONFIGURATION
|
|
# =============================================================================
|
|
|
|
# Mail settings
|
|
MAIL_MAILER=smtp
|
|
MAIL_HOST=smtp.gmail.com
|
|
MAIL_PORT=587
|
|
MAIL_USERNAME=your_email@gmail.com
|
|
MAIL_PASSWORD=your_app_password
|
|
MAIL_ENCRYPTION=tls
|
|
MAIL_FROM_ADDRESS=your_email@gmail.com
|
|
MAIL_FROM_NAME="Sibedas PBG Web"
|
|
|
|
# =============================================================================
|
|
# GOOGLE SHEETS API CONFIGURATION
|
|
# =============================================================================
|
|
|
|
# Google Sheets API
|
|
SPREAD_SHEET_ID=your_google_sheets_id_here
|
|
|
|
# =============================================================================
|
|
# LOGGING CONFIGURATION
|
|
# =============================================================================
|
|
|
|
# Log settings
|
|
LOG_CHANNEL=stack
|
|
LOG_DEPRECATIONS_CHANNEL=null
|
|
LOG_LEVEL=warning
|
|
|
|
# =============================================================================
|
|
# SECURITY CONFIGURATION
|
|
# =============================================================================
|
|
|
|
# Security settings
|
|
SESSION_SECURE_COOKIE=true
|
|
SESSION_SAME_SITE=lax
|
|
|
|
# =============================================================================
|
|
# PERFORMANCE CONFIGURATION
|
|
# =============================================================================
|
|
|
|
# Performance settings
|
|
CACHE_TTL=3600
|
|
SESSION_SECURE_COOKIE=true
|
|
|
|
# =============================================================================
|
|
# BACKUP CONFIGURATION
|
|
# =============================================================================
|
|
|
|
# Backup settings
|
|
BACKUP_RETENTION_DAYS=30
|
|
BACKUP_PATH=./backups
|
|
|
|
# =============================================================================
|
|
# MONITORING CONFIGURATION
|
|
# =============================================================================
|
|
|
|
# Health check settings
|
|
HEALTH_CHECK_ENABLED=true
|
|
HEALTH_CHECK_INTERVAL=30s
|
|
|
|
# =============================================================================
|
|
# NOTES
|
|
# =============================================================================
|
|
|
|
# 1. Generate APP_KEY: php artisan key:generate
|
|
# 2. Update DOMAIN and EMAIL for your domain
|
|
# 3. Set secure passwords for database
|
|
# 4. Configure mail settings for notifications
|
|
# 5. Set Google Sheets API credentials
|
|
# 6. For Let's Encrypt: ensure domain points to server and ports 80/443 are open
|
|
|
|
# =============================================================================
|
|
# DEPLOYMENT COMMANDS
|
|
# =============================================================================
|
|
|
|
# Setup reverse proxy and SSL:
|
|
# ./setup-reverse-proxy.sh setup
|
|
|
|
# Setup SSL only:
|
|
# ./setup-reverse-proxy.sh ssl
|
|
|
|
# Check status:
|
|
# ./setup-reverse-proxy.sh status
|
|
|
|
# Deploy production:
|
|
# ./scripts/deploy-production.sh deploy |