feat: SuiteCRM Docker + compose + CI/CD
Some checks failed
Docker Build & Push / build-and-push (push) Has been cancelled
Some checks failed
Docker Build & Push / build-and-push (push) Has been cancelled
This commit is contained in:
22
docker-entrypoint.sh
Normal file
22
docker-entrypoint.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Fix permissions
|
||||
chown -R www-data:www-data /var/www/html/cache /var/www/html/upload /var/www/html/custom 2>/dev/null || true
|
||||
chmod -R 755 /var/www/html 2>/dev/null || true
|
||||
chmod -R 775 /var/www/html/cache /var/www/html/upload /var/www/html/custom 2>/dev/null || true
|
||||
|
||||
# Generate SuiteCRM autoloader if missing
|
||||
if [ ! -f /var/www/html/vendor/autoload.php ] && [ -f /var/www/html/composer.json ]; then
|
||||
echo "Installing Composer dependencies..."
|
||||
cd /var/www/html && composer install --no-dev --optimize-autoloader 2>/dev/null || true
|
||||
fi
|
||||
|
||||
# Set recommended permissions
|
||||
touch /var/www/html/config.php 2>/dev/null || true
|
||||
chmod 640 /var/www/html/config.php 2>/dev/null || true
|
||||
chown www-data:www-data /var/www/html/config.php 2>/dev/null || true
|
||||
|
||||
echo "SuiteCRM ready. Access http://localhost:8080 to complete installation."
|
||||
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user