diff --git a/php/entrypoint.sh b/php/entrypoint.sh new file mode 100644 index 0000000..f50fd39 --- /dev/null +++ b/php/entrypoint.sh @@ -0,0 +1,20 @@ +#!/bin/sh +set -e + +echo "🔹 Mise à jour du code depuis le repo privé..." +if [ -d "/var/www/html/.git" ]; then + git reset --hard + git clean -fd + git pull +fi + +echo "🔹 Exécution des migrations..." +php artsy migrade + +if [ ! -f /var/www/html/.db_initialized ]; then + echo "🔹 Seed initial..." + php artsy seed:run -s MainSeeder + touch /var/www/html/.db_initialized +fi + +exec php-fpm -O