diff --git a/docker/mysql_db_data/.gitignore b/docker/mysql_db_data/.gitignore index e08be743f..f5fd78b74 100644 --- a/docker/mysql_db_data/.gitignore +++ b/docker/mysql_db_data/.gitignore @@ -1,6 +1,8 @@ -# 忽略目录中所有内容 -**/*.* - +# 忽略目录下所有文件和子目录 +* +# 忽略所有子目录 +*/ # 但不忽略 .gitkeep 文件 !.gitkeep +# 不忽略 .gitignore 文件自身 !.gitignore \ No newline at end of file diff --git a/docker/php/Dockerfile b/docker/php/Dockerfile index 99cd45c4c..9011f8348 100644 --- a/docker/php/Dockerfile +++ b/docker/php/Dockerfile @@ -27,6 +27,7 @@ RUN apt-get update && apt-get install -y \ libfreetype6-dev \ libjpeg62-turbo-dev \ libpng-dev \ + iputils-ping \ && rm -rf /var/lib/apt/lists/* # 安装 PHP 扩展 diff --git a/docker/php/entrypoint.sh b/docker/php/entrypoint.sh index 83bc2ed6d..23d4ac238 100644 --- a/docker/php/entrypoint.sh +++ b/docker/php/entrypoint.sh @@ -1,7 +1,7 @@ #!/bin/bash # 检查并创建必要的目录 -for dir in "/var/www/html/runtime" "/var/www/html/uploads" "/var/www/html/tmp" "/var/www/html/temp"; do +for dir in "/var/www/html/runtime" "/var/www/html/uploads"; do if [ ! -d "$dir" ]; then mkdir -p "$dir" echo "创建目录: $dir" diff --git a/docker/php/supervisord.conf b/docker/php/supervisord.conf index 3291b19e9..df093b0f3 100644 --- a/docker/php/supervisord.conf +++ b/docker/php/supervisord.conf @@ -8,7 +8,6 @@ pidfile=/var/run/supervisord.pid [program:php-fpm] command=php-fpm -directory=/var/www/html autostart=true autorestart=true startretries=3 @@ -22,19 +21,18 @@ stderr_logfile=/var/log/supervisor/php-fpm-error.log stderr_logfile_maxbytes=10MB stderr_logfile_backups=10 -# [program:think-cron] -# command=php /var/www/html/think cron:schedule -# process_name=%(program_name)s_%(process_num)02d -# numprocs=1 -# directory=/var/www/html -# autostart=true -# autorestart=true -# startretries=3 -# stdout_logfile=/var/log/supervisor/think-cron.log -# stdout_logfile_maxbytes=10MB -# stdout_logfile_backups=10 -# stderr_logfile=/var/log/supervisor/think-cron-error.log -# stderr_logfile_maxbytes=10MB -# stderr_logfile_backups=10 -# startsecs=3 -# stopwaitsecs=10 \ No newline at end of file +[program:think-cron] +command=php /var/www/html/think cron:schedule +process_name=%(program_name)s_%(process_num)02d +numprocs=1 +autostart=true +autorestart=true +startretries=3 +stdout_logfile=/var/log/supervisor/think-cron.log +stdout_logfile_maxbytes=10MB +stdout_logfile_backups=10 +stderr_logfile=/var/log/supervisor/think-cron-error.log +stderr_logfile_maxbytes=10MB +stderr_logfile_backups=10 +startsecs=3 +stopwaitsecs=10 \ No newline at end of file diff --git a/docker/redis_data/.gitignore b/docker/redis_data/.gitignore index e08be743f..f5fd78b74 100644 --- a/docker/redis_data/.gitignore +++ b/docker/redis_data/.gitignore @@ -1,6 +1,8 @@ -# 忽略目录中所有内容 -**/*.* - +# 忽略目录下所有文件和子目录 +* +# 忽略所有子目录 +*/ # 但不忽略 .gitkeep 文件 !.gitkeep +# 不忽略 .gitignore 文件自身 !.gitignore \ No newline at end of file diff --git a/docker/xdebug_logs/.gitignore b/docker/xdebug_logs/.gitignore index e08be743f..f5fd78b74 100644 --- a/docker/xdebug_logs/.gitignore +++ b/docker/xdebug_logs/.gitignore @@ -1,6 +1,8 @@ -# 忽略目录中所有内容 -**/*.* - +# 忽略目录下所有文件和子目录 +* +# 忽略所有子目录 +*/ # 但不忽略 .gitkeep 文件 !.gitkeep +# 不忽略 .gitignore 文件自身 !.gitignore \ No newline at end of file