From 6c4d03eb6b538980b5514ae7f098998979febd36 Mon Sep 17 00:00:00 2001 From: T'JAMPENS QUENTIN p2406187 Date: Mon, 24 Nov 2025 23:18:10 +0100 Subject: [PATCH] Update --- README.md | 3 +++ docker/entrypoint.sh | 8 -------- docker/php/Dockerfile | 4 ---- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 3ef9711..471be1e 100644 --- a/README.md +++ b/README.md @@ -33,3 +33,6 @@ docker compose up --build -d docker exec app-php php artisan key:generate docker exec app-php php artisan migrate ``` + +docker compose stop +docker compose start diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 74d5629..cfd9902 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -2,27 +2,19 @@ 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 diff --git a/docker/php/Dockerfile b/docker/php/Dockerfile index 05b1c97..9c5cc81 100644 --- a/docker/php/Dockerfile +++ b/docker/php/Dockerfile @@ -1,18 +1,14 @@ FROM php:8.4-fpm -# Install dependencies RUN apt-get update && apt-get install -y \ git unzip libzip-dev libpng-dev libonig-dev \ && docker-php-ext-install pdo_mysql zip -# Install composer COPY --from=composer:2 /usr/bin/composer /usr/bin/composer -# Copy entrypoint COPY ./entrypoint.sh /usr/local/bin/entrypoint.sh RUN chmod +x /usr/local/bin/entrypoint.sh -# Working directory WORKDIR /var/www/app ENTRYPOINT ["entrypoint.sh"]