From 452b4039fed6d9f70e8f461c3315ad516cba043e Mon Sep 17 00:00:00 2001 From: yuetsh <517252939@qq.com> Date: Sun, 15 Jun 2025 22:32:59 +0800 Subject: [PATCH] test --- Dockerfile | 4 +--- entrypoint.sh | 4 ---- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6c168e6..37fea24 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,9 +29,7 @@ COPY --from=builder /usr/local/bin/ /usr/local/bin/ # 复制应用代码 COPY . . -# 创建media目录并设置权限 -RUN mkdir -p /app/media \ - && chmod +x /app/entrypoint.sh +RUN chmod +x /app/entrypoint.sh EXPOSE 8000 diff --git a/entrypoint.sh b/entrypoint.sh index 6753c28..144509a 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -15,10 +15,6 @@ python manage.py collectstatic --noinput # 计算worker数量 (CPU核心数 * 2 + 1) WORKERS=$(python -c 'import multiprocessing; print(multiprocessing.cpu_count() * 2 + 1)') -# 确保媒体目录存在并有正确的权限 -echo "Setting up media directory..." -mkdir -p /app/media - # 启动 Gunicorn echo "Starting Gunicorn with $WORKERS workers..." exec gunicorn api.asgi:application \