This guide covers different deployment options for FlowBoard in production environments.
- Linux server (Ubuntu 20.04+ recommended)
- PHP 8.2+
- Composer
- Node.js 18+
- Web server (Nginx/Apache)
- Database (MySQL 8.0+ or PostgreSQL 13+)
- Redis (optional, for caching and queues)
-
Prepare the Server
# Update system sudo apt update && sudo apt upgrade -y # Install PHP and extensions sudo apt install php8.2-fpm php8.2-cli php8.2-mysql php8.2-xml php8.2-mbstring php8.2-curl php8.2-gd php8.2-zip php8.2-redis # Install Composer curl -sS https://getcomposer.org/installer | php sudo mv composer.phar /usr/local/bin/composer # Install Node.js curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - sudo apt install nodejs
-
Clone and Setup Application
# Clone repository cd /var/www sudo git clone https://github.com/CodeXpedite/flowboard.git cd flowboard # Install dependencies composer install --no-dev --optimize-autoloader npm ci npm run build # Set permissions sudo chown -R www-data:www-data /var/www/flowboard sudo chmod -R 755 /var/www/flowboard/storage sudo chmod -R 755 /var/www/flowboard/bootstrap/cache
-
Environment Configuration
# Copy environment file cp .env.example .env # Generate application key php artisan key:generate # Edit environment variables nano .env
-
Database Setup
# Create database mysql -u root -p CREATE DATABASE flowboard; CREATE USER 'flowboard'@'localhost' IDENTIFIED BY 'secure_password'; GRANT ALL PRIVILEGES ON flowboard.* TO 'flowboard'@'localhost'; FLUSH PRIVILEGES; EXIT; # Run migrations php artisan migrate --force php artisan db:seed --force
-
Nginx Configuration
server { listen 80; server_name your-domain.com; root /var/www/flowboard/public; add_header X-Frame-Options "SAMEORIGIN"; add_header X-Content-Type-Options "nosniff"; index index.php; charset utf-8; location / { try_files $uri $uri/ /index.php?$query_string; } location = /favicon.ico { access_log off; log_not_found off; } location = /robots.txt { access_log off; log_not_found off; } error_page 404 /index.php; location ~ \.php$ { fastcgi_pass unix:/var/run/php/php8.2-fpm.sock; fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; include fastcgi_params; } location ~ /\.(?!well-known).* { deny all; } }
-
Process Management (Supervisor)
# Install Supervisor sudo apt install supervisor # Create queue worker configuration sudo nano /etc/supervisor/conf.d/flowboard-worker.conf
[program:flowboard-worker] process_name=%(program_name)s_%(process_num)02d command=php /var/www/flowboard/artisan queue:work --sleep=3 --tries=3 autostart=true autorestart=true user=www-data numprocs=8 redirect_stderr=true stdout_logfile=/var/www/flowboard/storage/logs/worker.log
-
SSL Certificate (Let's Encrypt)
sudo apt install certbot python3-certbot-nginx sudo certbot --nginx -d your-domain.com
-
Using Docker Compose
# Clone repository git clone https://github.com/CodeXpedite/flowboard.git cd flowboard # Copy environment file cp .env.example .env # Edit environment variables for Docker nano .env # Build and start containers docker-compose up -d # Run migrations docker-compose exec app php artisan migrate --force docker-compose exec app php artisan db:seed --force
-
Environment Variables for Docker
DB_CONNECTION=mysql DB_HOST=database DB_PORT=3306 DB_DATABASE=flowboard DB_USERNAME=flowboard DB_PASSWORD=secret REDIS_HOST=redis CACHE_STORE=redis QUEUE_CONNECTION=redis
- Connect your server to Laravel Forge
- Create a new site pointing to your repository
- Configure environment variables
- Enable queue workers
- Set up SSL certificate
- Connect your GitHub repository
- Configure build and run commands
- Set environment variables
- Add database and Redis components
- Use container services (ECS, Container Instances, Cloud Run)
- Set up managed databases
- Configure load balancers
- Implement auto-scaling
# Application
APP_NAME="FlowBoard"
APP_ENV=production
APP_DEBUG=false
APP_URL=https://your-domain.com
# Database
DB_CONNECTION=mysql
DB_HOST=your-db-host
DB_DATABASE=flowboard
DB_USERNAME=flowboard_user
DB_PASSWORD=secure_password
# Cache & Queue
CACHE_STORE=redis
QUEUE_CONNECTION=redis
REDIS_HOST=your-redis-host
# Mail
MAIL_MAILER=smtp
MAIL_HOST=your-smtp-host
MAIL_PORT=587
MAIL_USERNAME=your-smtp-user
MAIL_PASSWORD=your-smtp-password
MAIL_FROM_ADDRESS=noreply@your-domain.com
# GitHub Integration
GITHUB_CLIENT_ID=your_github_client_id
GITHUB_CLIENT_SECRET=your_github_client_secret
GITHUB_WEBHOOK_SECRET=your_webhook_secret
# Push Notifications
VAPID_PUBLIC_KEY=your_vapid_public_key
VAPID_PRIVATE_KEY=your_vapid_private_key
VAPID_SUBJECT=mailto:admin@your-domain.com-
Enable Opcache
; /etc/php/8.2/fpm/conf.d/10-opcache.ini opcache.enable=1 opcache.memory_consumption=128 opcache.interned_strings_buffer=8 opcache.max_accelerated_files=4000 opcache.revalidate_freq=2 opcache.fast_shutdown=1
-
Configure PHP-FPM
; /etc/php/8.2/fpm/pool.d/www.conf pm = dynamic pm.max_children = 50 pm.start_servers = 20 pm.min_spare_servers = 10 pm.max_spare_servers = 30
-
Database Optimization
-- Enable query cache SET GLOBAL query_cache_size = 268435456; SET GLOBAL query_cache_type = ON; -- Optimize buffer sizes SET GLOBAL innodb_buffer_pool_size = 1073741824;
-
File Permissions
find /var/www/flowboard -type f -exec chmod 644 {} \; find /var/www/flowboard -type d -exec chmod 755 {} \; chmod -R 775 /var/www/flowboard/storage chmod -R 775 /var/www/flowboard/bootstrap/cache -
Hide Server Information
# Add to nginx.conf server_tokens off;
-
Rate Limiting
# Add to nginx server block limit_req_zone $binary_remote_addr zone=login:10m rate=5r/m; location /login { limit_req zone=login burst=5 nodelay; }
# Create health check endpoint
php artisan make:command HealthCheck# Rotate logs daily
sudo nano /etc/logrotate.d/flowboard/var/www/flowboard/storage/logs/*.log {
daily
missingok
rotate 52
compress
delaycompress
notifempty
create 644 www-data www-data
}
#!/bin/bash
# backup.sh
DATE=$(date +%Y%m%d_%H%M%S)
BACKUP_DIR="/var/backups/flowboard"
# Database backup
mysqldump -u flowboard -p flowboard > $BACKUP_DIR/db_$DATE.sql
# File backup
tar -czf $BACKUP_DIR/files_$DATE.tar.gz /var/www/flowboard
# Cleanup old backups (keep 30 days)
find $BACKUP_DIR -name "*.sql" -mtime +30 -delete
find $BACKUP_DIR -name "*.tar.gz" -mtime +30 -delete-
Application Performance
# Install monitoring tools composer require laravel/telescope --dev php artisan telescope:install php artisan migrate -
Server Monitoring
- CPU and memory usage
- Disk space monitoring
- Network traffic analysis
- Database performance metrics
-
Permission Errors
sudo chown -R www-data:www-data /var/www/flowboard sudo chmod -R 775 storage bootstrap/cache
-
Queue Workers Not Processing
# Restart queue workers sudo supervisorctl restart flowboard-worker:*
-
Database Connection Issues
# Test database connection php artisan tinker DB::connection()->getPdo();
-
Cache Issues
# Clear all caches php artisan cache:clear php artisan config:clear php artisan route:clear php artisan view:clear
- Check application logs:
/var/www/flowboard/storage/logs/ - Monitor queue jobs:
php artisan queue:monitor - Database queries:
php artisan db:monitor - Security logs:
/var/www/flowboard/storage/logs/security.log
For additional support, please visit our GitHub Issues page.