Merge branch '7.2' into 7.4

This commit is contained in:
2022-06-21 20:03:16 +02:00
2 changed files with 10 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
FROM php:7.4-fpm FROM php:7.4-fpm
ENV WORKDIR=/var/www ENV WORKDIR=/var/www
ENV STORAGE_DIR=/var/www/storage ENV STORAGE_DIR=/var/www/storage
ENV LARAVEL_PROCS_NUMBER=2
# Install system dependencies # Install system dependencies
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
git \ git \
@@ -39,9 +40,10 @@ RUN docker-php-ext-enable rdkafka \
&& rm -rf /php-rdkafka && rm -rf /php-rdkafka
# Install PHP extensions zip, mbstring, exif, bcmath, intl # Install PHP extensions zip, mbstring, exif, bcmath, intl
RUN docker-php-ext-configure gd --with-freetype --with-jpeg RUN docker-php-ext-configure gd
RUN docker-php-ext-install zip mbstring exif pcntl bcmath -j$(nproc) gd intl RUN docker-php-ext-install zip mbstring exif pcntl bcmath -j$(nproc) gd intl
# Install Redis and enable it # Install Redis and enable it
RUN pecl install redis && docker-php-ext-enable redis RUN pecl install redis && docker-php-ext-enable redis

View File

@@ -53,7 +53,7 @@ if [ -f $WORKDIR/artisan ]; then
command=php $WORKDIR/artisan queue:work --sleep=3 --tries=3 command=php $WORKDIR/artisan queue:work --sleep=3 --tries=3
autostart=true autostart=true
autorestart=true autorestart=true
numprocs=2 numprocs=$LARAVEL_PROCS_NUMBER
user=root user=root
redirect_stderr=true redirect_stderr=true
stdout_logfile=/var/log/laravel_worker.log stdout_logfile=/var/log/laravel_worker.log
@@ -68,15 +68,19 @@ echo "Checking if storage directory exists"
echo "Directory $STORAGE_DIR exist. Fixing permissions..." echo "Directory $STORAGE_DIR exist. Fixing permissions..."
chown -R www-data:www-data $STORAGE_DIR chown -R www-data:www-data $STORAGE_DIR
chmod -R 775 $STORAGE_DIR chmod -R 775 $STORAGE_DIR
echo "${Green} Permissions fixed" echo "${Green}Permissions fixed"
else else
echo "${Red} Directory $STORAGE_DIR does not exist" echo "${Red} Directory $STORAGE_DIR does not exist"
echo "Fixing permissions from $WORKDIR" echo "Fixing permissions from $WORKDIR"
chown -R www-data:www-data $WORKDIR/storage chown -R www-data:www-data $WORKDIR/storage
chmod -R 775 $WORKDIR/storage chmod -R 775 $WORKDIR/storage
echo "${Green} Permissions fixed" echo "${Green}Permissions fixed"
fi fi
echo ""
echo "**********************************"
echo " Starting Supervisord... "
echo "***********************************"
supervisord -c /etc/supervisor/supervisord.conf supervisord -c /etc/supervisor/supervisord.conf