This commit is contained in:
xuyue committed 2025-06-15 22:13:35 +08:00
1 parent e5e9115c50
commit 7edeea299e
2 files changed
-7

No files matched your search

-5
View File
@@ -36,11 +36,6 @@ COPY . .
RUN chown -R appuser:appuser /app \
&& chmod +x /app/entrypoint.sh
# 在最终阶段,创建必要的目录并设置权限
RUN mkdir -p /app/media \
&& chown -R appuser:appuser /app/media \
&& chmod 755 /app/media
# 切换到非root用户
USER appuser
-2
View File
@@ -18,8 +18,6 @@ WORKERS=$(python -c 'import multiprocessing; print(multiprocessing.cpu_count() *
# 确保媒体目录存在并有正确的权限
echo "Setting up media directory..."
mkdir -p /app/media
chown -R appuser:appuser /app/media
chmod 755 /app/media
# 启动 Gunicorn
echo "Starting Gunicorn with $WORKERS workers..."