From 07bd63aabd355e736a3e0260aac9029707c0e280 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 4 Jun 2025 16:57:34 +0200 Subject: [PATCH] feat(docker): prod, fix misc --- Dockerfile | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index b24a20892..c1fdacbf1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -420,20 +420,23 @@ COPY ./docker/sintonia-webapp/php/php-ini-production /usr/local/etc/php/php.ini USER $sintonia_user WORKDIR /var/www/sintonia_webapp -RUN cron && \ - git clone --branch dev --single-branch https://git.congegni.net/Congegni/sintonia_webapp . && \ +RUN git clone --branch dev --single-branch https://git.congegni.net/Congegni/sintonia_webapp . && \ /home/$sintonia_user/composer install --no-progress --no-interaction && \ - /home/$sintonia_user/composer --no-cache dump-autoload --no-interaction && \ - php artisan migrate && \ + /home/$sintonia_user/composer --no-cache dump-autoload --no-interaction + +RUN php artisan migrate && \ php artisan key:generate && \ php artisan db:seed && \ - php artisan schedule:run >> /dev/null 2>&1 && \ set -eux && \ npm i && \ + npm run build + +RUN rm -rf /var/www/sintonia_webapp/node_modules /var/www/sintonia_webapp/.npm /var/www/sintonia_webapp/.composer /var/www/sintonia_webapp/.git && \ + rm -rf /home/$sintonia_user/node* /home/$sintonia_user/composer + +RUN cron && \ php-fpm -D && \ - npm run build && \ - rm -rf /var/www/sintonia_webapp/node_modules /var/www/sintonia_webapp/.npm /var/www/sintonia_webapp/.composer /var/www/sintonia_webapp/.git && \ - rm -rf /home/$sintonia_user/node* /home/$sintonia_user/composer && \ + php artisan schedule:run >> /dev/null 2>&1 && \ sleep infinity