openclassify/docker/php/entrypoint.sh
2023-07-23 21:33:38 +03:00

29 lines
703 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
if [ ! -f "vendor/autoload.php" ]; then
composer install --no-progress --no-interaction
else
echo "composer. nothing to do."
fi
if [ ! -f ".env" ]; then
echo "Creating env file for env from env-sail"
cp .env-sail .env
else
echo "env file exists. nothing to do."
fi
while IFS= read -r line || [[ -n "$line" ]]; do
if [[ "$line" == "INSTALLED="* ]]; then
installed="${line#*=}"
installed=$(echo "$installed" | tr -d '[:space:]' | tr -d '[:punct:]') # Boşlukları ve özel karakterleri sil
break
fi
done < .env
if [ "$installed" = "false" ]; then
echo ".env installed is false starting installing"
php artisan install --ready
fi
php-fpm -R