From d8d293ea7c10211f4046a8a565095de150ab7d29 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 5 Jun 2025 14:01:12 +0200 Subject: [PATCH] feat(docker): prod, fix misc --- Dockerfile | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9aa7b697e..28d858010 100644 --- a/Dockerfile +++ b/Dockerfile @@ -422,26 +422,21 @@ RUN chown $sintonia_user:$sintonia_user /home/$sintonia_user/.env USER $sintonia_user WORKDIR /var/www/sintonia_webapp -RUN git clone --branch dev --single-branch https://git.congegni.net/Congegni/sintonia_webapp . && \ +CMD git clone --branch dev --single-branch https://git.congegni.net/Congegni/sintonia_webapp . && \ cp /home/$sintonia_user/.env /var/www/sintonia_webapp && \ /home/$sintonia_user/composer install --no-progress --no-interaction && \ - /home/$sintonia_user/composer --no-cache dump-autoload --no-interaction - -RUN php artisan key:generate - -RUN php artisan migrate - -RUN php artisan db:seed && \ + /home/$sintonia_user/composer --no-cache dump-autoload --no-interaction && \ + 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 key:generate && \ + php artisan migrate && \ + 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 && \ + npm run build && \ + cron && \ php-fpm -D && \ - php artisan schedule:run >> /dev/null 2>&1 && \ sleep infinity