feat(docker): added xdebug support, run laravel job once

This commit is contained in:
Michael 2025-02-06 13:59:44 +01:00
parent 18ad58fd68
commit 013659e034
1 changed files with 4 additions and 8 deletions

View File

@ -364,17 +364,12 @@ ENV sintonia_laravel_port=${sintonia_laravel_port}
ENV sintonia_vite_port=${sintonia_vite_port}
USER root
RUN pecl install xdebug && docker-php-ext-enable xdebug;
RUN pecl install xdebug && \
docker-php-ext-enable xdebug && \
echo 'xdebug.mode = debug\nxdebug.discover_client_host = 1\nxdebug.start_with_request = yes' >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
USER $sintonia_user
WORKDIR /var/www/sintonia_webapp
#COPY --chown=$sintonia_user:$sintonia_user ./sintonia_webapp/ ./
#Package installation
#RUN git config --global --add safe.directory /var/www/sintonia_webapp && \
# /home/$sintonia_user/composer install --no-progress --no-interaction --no-dev --no-autoloader && \
# set -eux && \
# npm i
#RUN php artisan ziggy:generate && mv ziggy.js resources/utils/ziggy.js
#RUN cp $HOME/.env ./
@ -384,6 +379,7 @@ CMD git config --global --add safe.directory /var/www/sintonia_webapp && \
/home/$sintonia_user/composer install --no-progress --no-interaction --no-dev --no-autoloader && \
/home/$sintonia_user/composer --no-cache dump-autoload --no-interaction --no-dev && \
php artisan key:generate && \
php artisan schedule:run >> /dev/null 2>&1 & \
set -eux && \
npm i && \
npx vite --port $sintonia_vite_port --host & \