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": [