#!/bin/bash set -e echo "🚀 Starting ProcessMaker Community Edition..." # Display database configuration echo "🔧 Database Configuration:" echo " DB_HOST: ${DB_HOST:-not set}" echo " DB_PORT: ${DB_PORT:-not set}" echo " DB_NAME: ${DB_NAME:-not set}" echo " DB_USER: ${DB_USER:-not set}" echo "" # Set permissions (like Laravel TODO pattern) echo "🛠 Setting permissions..." chmod -R 777 /var/www/html echo "✅ Permissions set" # Source Apache environment variables if [ -f /etc/apache2/envvars ]; then . /etc/apache2/envvars fi # Start Apache echo "🌐 Starting Apache on port 7860..." echo "📍 DocumentRoot: /var/www/html/workflow/public_html" echo "" echo "✅ ProcessMaker is starting!" echo "🌐 Access at: http://localhost:7860" echo "" # Start Apache in foreground exec apache2 -D FOREGROUND