From 03706c054d6c792f504335707f549ade7b7660d5 Mon Sep 17 00:00:00 2001 From: xboard Date: Thu, 11 Apr 2024 20:37:46 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20docker=E7=8E=AF=E5=A2=83=E4=BF=AE?= =?UTF-8?q?=E6=94=B9php=E4=B8=BA=E9=9D=9Eroot=E8=BF=90=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .docker/etc/crontabs/{root => www} | 0 .docker/etc/supervisor/supervisord.conf | 4 ++-- Dockerfile | 3 ++- composer.json | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) rename .docker/etc/crontabs/{root => www} (100%) diff --git a/.docker/etc/crontabs/root b/.docker/etc/crontabs/www similarity index 100% rename from .docker/etc/crontabs/root rename to .docker/etc/crontabs/www diff --git a/.docker/etc/supervisor/supervisord.conf b/.docker/etc/supervisor/supervisord.conf index 382327d..0eb7ee7 100644 --- a/.docker/etc/supervisor/supervisord.conf +++ b/.docker/etc/supervisor/supervisord.conf @@ -41,7 +41,7 @@ startretries=10 [program:adapterman] command=php -c php.ini webman.php start directory=/www -user=root +user=www numprocs=1 stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 @@ -54,7 +54,7 @@ startretries=3 [program:xboard-queue] command=php artisan horizon directory=/www -user=root +user=www stdout_logfile=/www/storage/logs/queue.log stdout_logfile_maxbytes=0 stderr_logfile=/www/storage/logs/queue_error.log diff --git a/Dockerfile b/Dockerfile index 6de7fc0..45a84bb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,12 +6,13 @@ RUN install-php-extensions pcntl bcmath RUN apk --no-cache add shadow supervisor nginx sqlite nginx-mod-http-brotli mysql-client git +RUN addgroup -S -g 1001 www && adduser -S -G www -u 1001 www #复制项目文件以及配置文件 WORKDIR /www COPY .docker / COPY . /www RUN composer install --optimize-autoloader --no-cache --no-dev \ && php artisan storage:link \ -&& chmod -R 777 ./ +&& chown -R www:www /www CMD [ "/usr/bin/supervisord", "--nodaemon", "-c" ,"/etc/supervisor/supervisord.conf" ] \ No newline at end of file diff --git a/composer.json b/composer.json index fc92b1f..41faf9b 100755 --- a/composer.json +++ b/composer.json @@ -70,7 +70,7 @@ "Tests\\": "tests/" } }, - "minimum-stability": "beta", + "minimum-stability": "stable", "prefer-stable": true, "scripts": { "post-autoload-dump": [