Update docker conf

This commit is contained in:
T'JAMPENS QUENTIN p2406187
2025-11-24 22:16:16 +01:00
parent 1eb75b5782
commit 60d1ec1364
7 changed files with 121 additions and 42 deletions
+28
View File
@@ -0,0 +1,28 @@
#!/bin/sh
APP_DIR=/var/www/app
# Vérifie si le repo existe
if [ ! -d "$APP_DIR/.git" ]; then
echo "📥 Aucun projet trouvé. Clonage..."
git clone https://oauth2:${GIT_TOKEN}@${GIT_REPO} $APP_DIR
else
echo "🔄 Projet existant. Pull..."
cd $APP_DIR
git pull
fi
cd $APP_DIR
# Permissions sur storage et cache
mkdir -p storage bootstrap/cache
chown -R www-data:www-data storage bootstrap/cache
chmod -R 775 storage bootstrap/cache
# Composer & artisan
composer install --no-interaction --prefer-dist
php artisan key:generate --force
php artisan migrate --force
php artisan config:cache
exec php-fpm